Fix history navigation when <2 items in history

On startup, there will be one page in the history, not zero.
Disable history navigation in such cases where the current page will
just get selected again.
This commit is contained in:
miruka 2021-04-09 01:56:43 -04:00
parent 58b4667c31
commit 66169e641e

View File

@ -76,7 +76,7 @@ HLoader {
} }
function moveThroughHistory(relativeMovement=1) { function moveThroughHistory(relativeMovement=1) {
if (history.length === 0) return false if (history.length < 2) return false
// Going beyond oldest entry in history // Going beyond oldest entry in history
if (historyPosition + relativeMovement >= history.length) { if (historyPosition + relativeMovement >= history.length) {