Avoid jumping on null map

This commit is contained in:
Eli Ribble 2026-03-10 20:14:19 +00:00
parent c2429654c6
commit d6407933f8
No known key found for this signature in database

View file

@ -16,7 +16,7 @@ class MapArcgisTile extends HTMLElement {
attributeChangedCallback(name, old_value, new_value) {
//console.log("map-arcgis-tile: attribute changed", name, old_value, new_value);
if (name == "latitude" || (name == "longitude" && this._map != null)) {
if ((name == "latitude" || name == "longitude") && this._map != null) {
const latitude = parseFloat(this.getAttribute("latitude"));
const longitude = parseFloat(this.getAttribute("longitude"));
this._map.jumpTo({