From 01853e8919f80dd24d7864b2f5a4232cf475b5dc Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Mon, 02 Nov 2020 22:37:46 +0000
Subject: [PATCH] [map] Fix removing currently selected feature

---
 map.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/map.js b/map.js
index 1cc411e..132a039 100644
--- a/map.js
+++ b/map.js
@@ -322,10 +322,10 @@
 	},
 	_removeFeature: function(feature) {
 		if(!feature) return;
-		this.source.removeFeature(feature);
 		if(this.selectedFeatureId === feature.getId()) {
 			this.deselect();
 		}
+		this.source.removeFeature(feature);
 	},
 	loadFullData: function(data) {
 		var self = this;

--
Gitblit v1.9.1