localStorage is strings, need to parseInt

This commit is contained in:
xenofem 2024-07-07 01:35:50 -04:00
parent d689733bbb
commit 3b533452bc

View file

@ -29,7 +29,7 @@ function newSeed() {
}
function isReading(work) {
return READING_WORKS.indexOf(work.id) !== -1 || !!localStorage.getItem(`${work.id}-currentPage`);
return READING_WORKS.indexOf(work.id) !== -1 || !!parseInt(localStorage.getItem(`${work.id}-currentPage`));
}
document.addEventListener('DOMContentLoaded', () => {