Fix ImageOverlay onRemove - check if this.div_ is defined

This commit is contained in:
Alexandre Dubé 2018-05-18 09:44:34 -04:00
parent 9bffcf5020
commit 5e525371c8

View File

@ -134,6 +134,8 @@ olgm.gm.ImageOverlay.prototype.setZIndex = function(zIndex) {
* @api
*/
olgm.gm.ImageOverlay.prototype.onRemove = function() {
this.div_.parentNode.removeChild(this.div_);
this.div_ = null;
if (this.div_) {
this.div_.parentNode.removeChild(this.div_);
this.div_ = null;
}
};