only parse hashParams if there is a hash
Presumably this was an oversight in the original implementation, as `OSM.params` falls back to the page's `query` string if the function's parameter (here: the page's `hash`) is an empty string. This fixes some inconsistent behaviour of the website. In the example below, the first URL sets the `background` to `none` while in the second example it doesn't. * https://www.openstreetmap.org/edit.html?background=none * https://www.openstreetmap.org/edit.html?background=none#map=…
This commit is contained in:
parent
9adad9f90d
commit
66656e1d1d
1 changed files with 2 additions and 1 deletions
|
@ -4,7 +4,8 @@ $(document).ready(function () {
|
|||
var id = $("#id-embed");
|
||||
|
||||
if (id.data("configured") === true) {
|
||||
var hashParams = OSM.params(location.hash.substring(1));
|
||||
var hash = location.hash.substring(1);
|
||||
var hashParams = hash ? OSM.params(hash) : {};
|
||||
var mapParams = OSM.mapParams();
|
||||
var params = {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue