Do not call AttributionControl._update for removed tile layer
This commit is contained in:
parent
8ce09b039f
commit
d1912f57e9
1 changed files with 3 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue