This was broken due to a typo in the name of the data-* attribute (`googleMapsGeocdingStore`).
Co-authored-by: Tim Düsterhus <duesterhus@woltlab.com>
this.#element.dataset.googleMapsLat = lat.toString();
this.#element.dataset.googleMapsLng = lng.toString();
- if (this.#element.hasAttribute("data-google-maps-geocoding-store") && this.#element.form) {
- this.#store(this.#element.dataset.googleMapsGeocdingStore || "", lat, lng);
+ const prefix = this.#element.dataset.googleMapsGeocodingStore;
+ if (prefix != null && this.#element.form) {
+ this.#store(prefix, lat, lng);
}
}
#setLocation(lat, lng) {
this.#element.dataset.googleMapsLat = lat.toString();
this.#element.dataset.googleMapsLng = lng.toString();
- if (this.#element.hasAttribute("data-google-maps-geocoding-store") && this.#element.form) {
- this.#store(this.#element.dataset.googleMapsGeocdingStore || "", lat, lng);
+ const prefix = this.#element.dataset.googleMapsGeocodingStore;
+ if (prefix != null && this.#element.form) {
+ this.#store(prefix, lat, lng);
}
}
#store(prefix, lat, lng) {