X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/de0bf2549978f0b517c06c3eadaa477b37433ea6..8a8c2517f2e594bcecba1fda751ffd34b39dbe9a:/app/assets/javascripts/leaflet.share.js diff --git a/app/assets/javascripts/leaflet.share.js b/app/assets/javascripts/leaflet.share.js index f0d278109..7b0b5ef02 100644 --- a/app/assets/javascripts/leaflet.share.js +++ b/app/assets/javascripts/leaflet.share.js @@ -337,7 +337,8 @@ L.OSM.share = function (options) { } function update() { - var canEmbed = map.getMapBaseLayerId() !== "tracestracktopo"; + const layer = map.getMapBaseLayer(); + var canEmbed = layer && layer.options.canEmbed; var bounds = map.getBounds(); $("#link_marker")