X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9fe45bdfe380d723bc89bec8b5cbaa009fc29fe7..9969bc5a24eaeaeb8614d555c215310fc811ca0d:/app/assets/javascripts/edit/id.js.erb?ds=inline diff --git a/app/assets/javascripts/edit/id.js.erb b/app/assets/javascripts/edit/id.js.erb index 1891c5adc..90318788c 100644 --- a/app/assets/javascripts/edit/id.js.erb +++ b/app/assets/javascripts/edit/id.js.erb @@ -3,13 +3,14 @@ $(document).ready(function () { var id = $("#id-embed"); - if (id.data("key")) { - var hashParams = OSM.params(location.hash.substring(1)); + if (id.data("configured") === true) { + var hash = location.hash.substring(1); + var hashParams = hash ? OSM.params(hash) : {}; var mapParams = OSM.mapParams(); var params = {}; if (mapParams.object) { - params.id = mapParams.object.type[0] + mapParams.object.id; + params.id = mapParams.object.type + '/' + mapParams.object.id; mapParams = OSM.parseHash(location.hash); if (mapParams.center) { params.map = mapParams.zoom + '/' + mapParams.center.lat + '/' + mapParams.center.lng;