From 91af2d9411da21ea96510dfdf2a9d9822e728668 Mon Sep 17 00:00:00 2001 From: Rhiannon Morris Date: Sat, 29 Aug 2020 14:28:21 +0200 Subject: [PATCH] fix back button --- script/single.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/single.js b/script/single.js index dc8fae7..5d63b5f 100644 --- a/script/single.js +++ b/script/single.js @@ -59,12 +59,12 @@ function activateButton(button, doPush = true, firstLoad = false) { } function useFragment(firstLoad = false) { - let button; + let button = altButtons[0]; let frag = location.hash.replace(/^#/, ''); if (frag) { let selected = document.getElementById(frag); - button = selected ? selected : altButtons[0]; + if (selected) button = selected; } let id;