From db83b1cb029c93ea75ad28ba57c3c0096dad8029 Mon Sep 17 00:00:00 2001 From: Vasek Sraier Date: Mon, 28 Sep 2020 13:56:43 +0200 Subject: [PATCH] frontend: react to hash changes --- frontend/src/App.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 83e3362..3a729b5 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -15,7 +15,11 @@ finalSelect = true; } - const hash = window.location.hash.substr(1); + // react to hash changes + let hash = window.location.hash.substr(1); + window.onhashchange = () => { + hash = window.location.hash.substr(1); + }