cleanup currentPage when it's 0 too
This commit is contained in:
parent
3b533452bc
commit
fa5e5a1f6a
|
@ -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}`;
|
||||
|
|
Loading…
Reference in a new issue