From 3b533452bcb9340fe8a45607735bf8e2ea438d7f Mon Sep 17 00:00:00 2001 From: xenofem Date: Sun, 7 Jul 2024 01:35:50 -0400 Subject: [PATCH] localStorage is strings, need to parseInt --- dlibrary/static/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlibrary/static/index.js b/dlibrary/static/index.js index cd5bfb5..eb54c29 100644 --- a/dlibrary/static/index.js +++ b/dlibrary/static/index.js @@ -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', () => {