forked from MapComplete/MapComplete
Fix dynamically selecting the popup when changing the hash
This commit is contained in:
parent
162ab325f9
commit
df92bda151
2 changed files with 18 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue