This repository was archived by the owner on Nov 30, 2018. It is now read-only.
This repository was archived by the owner on Nov 30, 2018. It is now read-only.
TypeError: Cannot read property 'removeChild' of null #2038
Open
Description
For anyone hitting this issue when clustering markers, it is a result of using third-party library of MarkerWithLabel
`MarkerLabel_.prototype.onRemove = function () {
var i;
this.labelDiv_.parentNode.removeChild(this.labelDiv_);
this.eventDiv_.parentNode.removeChild(this.eventDiv_);
// Remove event listeners:
for (i = 0; i < this.listeners_.length; i++) {
google.maps.event.removeListener(this.listeners_[i]);
}
};`
needs to change this:
this.labelDiv_.parentNode.removeChild(this.labelDiv_);
to this:
if (this.labelDiv_.parentNode){ this.labelDiv_.parentNode.removeChild(this.labelDiv_); }
@nmccready
any fix for that?
Metadata
Metadata
Assignees
Labels
No labels