diff --git a/public/src/modules/handleBack.js b/public/src/modules/handleBack.js index 6a11ebc45e..94e7125f52 100644 --- a/public/src/modules/handleBack.js +++ b/public/src/modules/handleBack.js @@ -35,10 +35,14 @@ define('handleBack', [ storage.removeItem('category:bookmark'); storage.removeItem('category:bookmark:clicked'); + if (!utils.isNumber(bookmarkIndex)) { + return; + } bookmarkIndex = Math.max(0, parseInt(bookmarkIndex, 10) || 0); clickedIndex = Math.max(0, parseInt(clickedIndex, 10) || 0); - if (!utils.isNumber(bookmarkIndex)) { + + if (!bookmarkIndex && !clickedIndex) { return; }