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;