From 7e792d09fdda72173a939570ee9b773cef1ef9d8 Mon Sep 17 00:00:00 2001 From: Alireza Date: Wed, 24 Apr 2024 09:25:00 -0400 Subject: [PATCH] Fix toolbox options mapping bug in Toolbox.tsx --- platform/ui/src/components/Toolbox/Toolbox.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/ui/src/components/Toolbox/Toolbox.tsx b/platform/ui/src/components/Toolbox/Toolbox.tsx index abf075f96ce..e27deed3804 100644 --- a/platform/ui/src/components/Toolbox/Toolbox.tsx +++ b/platform/ui/src/components/Toolbox/Toolbox.tsx @@ -37,7 +37,9 @@ function Toolbox({ servicesManager, buttonSectionId, commandsManager, title, ... const currentToolBoxStateStr = JSON.stringify( Object.keys(toolboxState.toolOptions).map(tool => { const options = toolboxState.toolOptions[tool]; - return options.map(option => `${option.id}-${option.value}`); + if (Array.isArray(options)) { + return options?.map(option => `${option.id}-${option.value}`); + } }) );