From adce78e19ede7c39682c02e02ed94c506f53009f Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 16 Aug 2018 06:25:55 +0200 Subject: [PATCH] Remove redundant if block --- src/ol/interaction/Select.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/ol/interaction/Select.js b/src/ol/interaction/Select.js index aaaba63537..22f36f2e91 100644 --- a/src/ol/interaction/Select.js +++ b/src/ol/interaction/Select.js @@ -255,14 +255,11 @@ class Select extends Interaction { */ this.featureLayerAssociation_ = {}; - if (this.featureOverlay_) { - const features = this.featureOverlay_.getSource().getFeaturesCollection(); - listen(features, CollectionEventType.ADD, - this.addFeature_, this); - listen(features, CollectionEventType.REMOVE, - this.removeFeature_, this); - } - + const features = this.featureOverlay_.getSource().getFeaturesCollection(); + listen(features, CollectionEventType.ADD, + this.addFeature_, this); + listen(features, CollectionEventType.REMOVE, + this.removeFeature_, this); } /**