From de596ae408e3da1ce0a317640d82bc9fce1f51e5 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 28 Mar 2024 12:36:28 +0100 Subject: [PATCH] location.hash is URI-encoded --- packages/html2/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/html2/src/index.ts b/packages/html2/src/index.ts index 4c19e4f..5a746b8 100644 --- a/packages/html2/src/index.ts +++ b/packages/html2/src/index.ts @@ -217,7 +217,7 @@ function spawnLocationHashTracker(ds: Ref) { field hashValue: string = '/'; const loadHash = () => { - var h = window.location.hash; + var h = decodeURIComponent(window.location.hash); if (h.length && h[0] === '#') { h = h.slice(1); }