X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3324fd8dd395ab8a54fa04045ee6ad9799337131..c5fc21e6a6615646b3fa443b6fd12a80b4fef331:/app/views/site/id.html.erb?ds=inline 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)); } }));