diff --git a/dlibrary/static/viewer.js b/dlibrary/static/viewer.js index a81edf2..9d4e1e2 100644 --- a/dlibrary/static/viewer.js +++ b/dlibrary/static/viewer.js @@ -169,7 +169,7 @@ document.addEventListener('DOMContentLoaded', () => { function exitToWork() { changeDuration(duration, true); - if (currentPage === IMAGES.length - 1) { + if (currentPage === IMAGES.length - 1 || currentPage === 0) { localStorage.removeItem(`${WORK_ID}-currentPage`); } window.location.href = `../${INDEX}`;