diff --git a/src/ol/interaction/Select.js b/src/ol/interaction/Select.js index a08c22bc54..9fde58ccbb 100644 --- a/src/ol/interaction/Select.js +++ b/src/ol/interaction/Select.js @@ -333,8 +333,7 @@ class Select extends Interaction { if (this.style_) { this.features_.forEach(this.applySelectedStyle_.bind(this)); } - } - if (!map) { + } else { this.features_.removeEventListener(CollectionEventType.ADD, this.boundAddFeature_); this.features_.removeEventListener(CollectionEventType.REMOVE, this.boundRemoveFeature_); }