X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/427f5457d9699c319a1957940a50dea887b00f9d..7a933cf928cfca83e5448c699fa84d1e209ba0a7:/app/assets/javascripts/id.js diff --git a/app/assets/javascripts/id.js b/app/assets/javascripts/id.js index 687f1e044..dd7cd3325 100644 --- a/app/assets/javascripts/id.js +++ b/app/assets/javascripts/id.js @@ -1,5 +1,7 @@ //= require iD +/* globals iD */ + document.addEventListener("DOMContentLoaded", function() { var container = document.getElementById("id-container"); @@ -12,7 +14,7 @@ document.addEventListener("DOMContentLoaded", function() { var id = iD.Context() .embed(true) .assetPath("iD/") - .assetMap(container.dataset.assetMap) + .assetMap(JSON.parse(container.dataset.assetMap)) .locale(container.dataset.locale, container.dataset.localePath) .preauth({ urlroot: location.protocol + "//" + location.host,