From 96746c2f7d4460d96f581ec85ae69b6a34d0b101 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Tue, 29 Apr 2025 15:03:14 +0200 Subject: [PATCH] fix crash when feature is deleted while map-panning and photoviewer is open closes #10994 --- modules/ui/photoviewer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/photoviewer.js b/modules/ui/photoviewer.js index 6438eb4fb..d667ee6fd 100644 --- a/modules/ui/photoviewer.js +++ b/modules/ui/photoviewer.js @@ -169,7 +169,8 @@ export function uiPhotoviewer(context) { const graph = context.graph(); const entities = context.selectedIDs() - .map(id => graph.entity(id)); + .map(id => graph.hasEntity(id)) + .filter(Boolean); if (entities.map(entity => entity.tags[tagName]) .every(value => value === activeImage?.id)) {