From 720d44d53ecc00a493575f3fefe7343b37113a1d Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Mon, 30 Jan 2023 10:30:06 +0900 Subject: [PATCH] fix workspace reference error in case of empty tabs --- .../@node-red/editor-client/src/js/ui/workspaces.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js index d274ba519..4e95ede63 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/workspaces.js @@ -195,7 +195,7 @@ RED.workspaces = (function() { ) } const currentTabs = workspace_tabs.listTabs() - const activeIndex = currentTabs.findIndex(id => id === activeWorkspace.id) + const activeIndex = currentTabs.findIndex(id => (activeWorkspace && (id === activeWorkspace.id))); menuItems.push( { label: RED._("workspace.moveToStart"),