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"),