From 998a9b86a373c377db269bac94aa8d27406c78da Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Fri, 5 Jun 2026 01:57:44 +0200 Subject: [PATCH] prevent location being just "#" --- copyparty/web/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copyparty/web/util.js b/copyparty/web/util.js index 8646d9bb..2bd9f8d0 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -1404,7 +1404,7 @@ function hist_replace(url) { function sethash(hv) { if (window.history && history.replaceState) { - hist_replace(location.pathname + location.search + '#' + hv); + hist_replace(location.pathname + location.search + (hv ? '#' : '') + hv); } else { location.hash = hv;