X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/de0bf2549978f0b517c06c3eadaa477b37433ea6..f8b04635a79cf23a30ae1c80029d8c33f34f8424:/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")