fix workspace reference error in case of empty tabs

This commit is contained in:
Hiroyasu Nishiyama 2023-01-30 10:30:06 +09:00
parent a607ee90e0
commit 720d44d53e
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"),