From aa2838cdcdf7e07ff667d24f8f094c8f49ab833b Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 8 Dec 2015 14:41:59 +0100 Subject: [PATCH] Remove use of goog.isNull --- src/ol/interaction/selectinteraction.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ol/interaction/selectinteraction.js b/src/ol/interaction/selectinteraction.js index a14e0bf9a7..7ef21263c6 100644 --- a/src/ol/interaction/selectinteraction.js +++ b/src/ol/interaction/selectinteraction.js @@ -360,12 +360,12 @@ ol.interaction.Select.prototype.setMap = function(map) { var currentMap = this.getMap(); var selectedFeatures = this.featureOverlay_.getSource().getFeaturesCollection(); - if (!goog.isNull(currentMap)) { + if (currentMap) { selectedFeatures.forEach(currentMap.unskipFeature, currentMap); } goog.base(this, 'setMap', map); this.featureOverlay_.setMap(map); - if (!goog.isNull(map)) { + if (map) { selectedFeatures.forEach(map.skipFeature, map); } }; @@ -396,7 +396,7 @@ ol.interaction.Select.prototype.addFeature_ = function(evt) { var map = this.getMap(); goog.asserts.assertInstanceof(feature, ol.Feature, 'feature should be an ol.Feature'); - if (!goog.isNull(map)) { + if (map) { map.skipFeature(feature); } }; @@ -411,7 +411,7 @@ ol.interaction.Select.prototype.removeFeature_ = function(evt) { var map = this.getMap(); goog.asserts.assertInstanceof(feature, ol.Feature, 'feature should be an ol.Feature'); - if (!goog.isNull(map)) { + if (map) { map.unskipFeature(feature); } };