]> git.openstreetmap.org Git - rails.git/commitdiff
Parse asset map JSON before passing it to iD
authorTom Hughes <tom@compton.nu>
Wed, 10 May 2017 08:14:09 +0000 (09:14 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 10 May 2017 08:14:09 +0000 (09:14 +0100)
app/assets/javascripts/id.js

index b54532af270c8000b0ddddd418ef1b3f2847e8e0..dd7cd3325f10f293311e79435cec6633a3d1f8ac 100644 (file)
@@ -14,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,