mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user