/* line #732 */
if (this._clearControlPos) {
this._clearControlPos();
}
/* ... */
/* line #746 */
for (i in this._layers) {
this._layers[i].remove();
}
Map#_clearControlPos() removes _controlCorners property. Then if you look into L.Yandex#onRemove() you will see such line:
/* line #78 */
map._controlCorners.bottomright.style.marginBottom = '0em';
It fails with exception while in a process of removing map cause it tries to use properties of deleted object.
Leaflet@1.3.1 leaflet-plugins@latest
Map#remove()
method has such operations sequence:Map#_clearControlPos()
removes_controlCorners
property. Then if you look intoL.Yandex#onRemove()
you will see such line:It fails with exception while in a process of removing map cause it tries to use properties of deleted object.
Am I wrong? 🤔