X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/3324fd8dd395ab8a54fa04045ee6ad9799337131..2a3bc0a38789b29b8798eafd80fc4fb77c5c7957:/app/views/site/id.html.erb diff --git a/app/views/site/id.html.erb b/app/views/site/id.html.erb index 53e177a3f..1b4cdf1bb 100644 --- a/app/views/site/id.html.erb +++ b/app/views/site/id.html.erb @@ -51,7 +51,7 @@ // http://bl.ocks.org/jfirebaugh/5439412 var hash = parent.OSM.formatHash({ lon: center[0], lat: center[1], zoom: zoom }); if (hash !== parent.location.hash) { - parent.location.replace(parent.location.href.replace(/#.*/, hash)); + parent.location.replace(parent.location.href.replace(/(#.*|$)/, hash)); } }));