What if we add a layer type check to the handler for which the handler was
triggered? Something like:
```js
map.on("moveend layeradd layerremove", function (e) {
if (!L.TileLayer.prototype.isPrototypeOf(e?.layer)){
return
}
updateLinks(
map.getCenter().wrap(),
map.getZoom(),
map.getLayersCode(),
map._object);
Cookies.set("_osm_location", OSM.locationCookie(map), { secure: true,
expires: expiry, path: "/", samesite: "lax" });
});
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5466#issuecomment-2571549034
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/issues/5466/2571549...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev