Merge pull request #4029 from node-red-hitachi/fix-tab-menu-error

fix workspace reference error in case of empty tabs
This commit is contained in:
Nick O'Leary 2023-01-30 09:34:05 +00:00 committed by GitHub
commit b99bd38649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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