Don't double escape :open_street_map_provider_options so they are parsed into a JS object rather than a string.

Before if you entered '{ accessToken: secret }' into the open street map provider options field in the admin content settings the 'JSON.parse(openStreetMapConfig.open_street_map_provider_options)' call in the open_street_map directive was converting them into a string because they were double escaped. They need to be converted into a JS object in order to set the Leaflet provider options.
This commit is contained in:
Cillian O'Ruanaidh
2020-07-31 20:08:09 +01:00
parent b025d5a600
commit 3c23952fd6

View File

@@ -15,7 +15,7 @@ module Api
end
def open_street_map_provider_options
ContentConfig.open_street_map_provider_options.to_json
ContentConfig.open_street_map_provider_options
end
end
end