From d06f795856470fde7bbbdf721030e0cd02b529f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 25 Jul 2018 11:16:45 -0400 Subject: [PATCH] fix scroll on back --- public/src/modules/handleBack.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; }