Skip to content

Commit

Permalink
Do not call AttributionControl._update for removed tile layer
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanboniface committed Dec 14, 2023
1 parent 8ce09b0 commit d1912f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion umap/static/umap/js/umap.controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -1246,8 +1246,10 @@ L.U.AttributionControl = L.Control.Attribution.extend({
},

_update: function () {
// Layer is no more on the map
if (!this._map) return
L.Control.Attribution.prototype._update.call(this)
// Use our how container, so we can hide/show on small screens
// Use our own container, so we can hide/show on small screens
const credits = this._container.innerHTML
this._container.innerHTML = ''
const container = L.DomUtil.add(
Expand Down

0 comments on commit d1912f5

Please sign in to comment.