Use better type

This commit is contained in:
Éric Lemoine
2013-12-05 09:43:17 +01:00
committed by Antoine Abt
parent 0b6e1e91c0
commit 712f451179
+4 -4
View File
@@ -26,9 +26,9 @@ ol.render.Box = function(opt_style) {
/** /**
* @private * @private
* @type {goog.events.Key|undefined} * @type {goog.events.Key}
*/ */
this.postComposeListenKey_ = undefined; this.postComposeListenKey_ = null;
/** /**
* @private * @private
@@ -117,9 +117,9 @@ ol.render.Box.prototype.requestMapRenderFrame_ = function() {
* @param {ol.Map} map Map. * @param {ol.Map} map Map.
*/ */
ol.render.Box.prototype.setMap = function(map) { ol.render.Box.prototype.setMap = function(map) {
if (goog.isDef(this.postComposeListenKey_)) { if (!goog.isNull(this.postComposeListenKey_)) {
goog.events.unlistenByKey(this.postComposeListenKey_); goog.events.unlistenByKey(this.postComposeListenKey_);
this.postComposeListenKey_ = undefined; this.postComposeListenKey_ = null;
this.map_.requestRenderFrame(); this.map_.requestRenderFrame();
this.map_ = null; this.map_ = null;
} }