Fix dynamically selecting the popup when changing the hash

This commit is contained in:
Pieter Vander Vennet 2023-02-09 16:05:37 +01:00
parent 162ab325f9
commit df92bda151
2 changed files with 18 additions and 10 deletions

View file

@ -90,12 +90,12 @@ export default class SelectedFeatureHandler {
if (feature === undefined) {
return
}
const currentlySeleced = state.selectedElement.data
if (currentlySeleced === undefined) {
const currentlySelected = state.selectedElement.data
if (currentlySelected === undefined) {
state.selectedElement.setData(feature)
return
}
if (currentlySeleced.properties?.id === feature.properties.id) {
if (currentlySelected.properties?.id === feature.properties.id) {
// We already have the right feature
return
}