From c9c25d275e856e512b27397b320b48e4ce3788e9 Mon Sep 17 00:00:00 2001 From: Steffen Zschaler Date: Fri, 12 Jan 2024 10:37:41 +0000 Subject: [PATCH] Fix hiding of generated activities --- platform/src/ActivityManager.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/src/ActivityManager.js b/platform/src/ActivityManager.js index e1830c6..8f2484c 100644 --- a/platform/src/ActivityManager.js +++ b/platform/src/ActivityManager.js @@ -509,9 +509,10 @@ class ActivityManager { let generatedPanelFound = false; for (const panel of this.activities[activityId].panels) { - - if (this.accessPanelDef(panel.ref)?.generated && !this.isPanelGenerated(panel.id) ){ - generatedPanelFound = this.accessPanelDef(panel.ref).generated; + let panelDef = this.accessPanelDef(panel.ref); + // If no panel definition can be found, treat the panel as generated. Panel definitions may only be contributed by generated tools. + if ((!panelDef) || (panelDef.generated && !this.isPanelGenerated(panel.id))) { + generatedPanelFound = true; break; } }