goog.array.forEach does not accept null values

This commit is contained in:
Éric Lemoine
2012-10-10 20:25:53 +02:00
parent 655e04368b
commit fbc810264b

View File

@@ -285,9 +285,10 @@ ol.MapBrowserEventHandler.prototype.disposeInternal = function() {
this.handleUp_, false, this);
goog.events.unlisten(element,
goog.events.EventType.CLICK, this.click_, false, this);
goog.asserts.assert(goog.isDef(this.dragListenerKeys_));
goog.array.forEach(this.dragListenerKeys_, goog.events.unlistenByKey);
this.dragListenerKeys_ = null;
if (!goog.isNull(this.dragListenerKeys_)) {
goog.array.forEach(this.dragListenerKeys_, goog.events.unlistenByKey);
this.dragListenerKeys_ = null;
}
};