diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts index 4f1211540cd..e58f295a475 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/window.test.ts @@ -489,7 +489,7 @@ suite('vscode API - window', () => { // Function to acquire the active tab within the active group const getActiveTabInActiveGroup = () => { const activeGroup = window.tabGroups.groups.filter(group => group.isActive)[0]; - return activeGroup.activeTab; + return activeGroup?.activeTab; }; await window.showTextDocument(docA, { viewColumn: ViewColumn.One, preview: false }); @@ -514,8 +514,7 @@ suite('vscode API - window', () => { await commands.executeCommand('workbench.action.closeActiveEditor'); await commands.executeCommand('workbench.action.closeActiveEditor'); - // TODO @lramos15 fix this failing piece - //assert.ok(!getActiveTabInActiveGroup()); + assert.ok(!getActiveTabInActiveGroup()); }); /* diff --git a/src/vs/workbench/api/browser/mainThreadEditorTabs.ts b/src/vs/workbench/api/browser/mainThreadEditorTabs.ts index 2bd9ae09322..d4736a0196d 100644 --- a/src/vs/workbench/api/browser/mainThreadEditorTabs.ts +++ b/src/vs/workbench/api/browser/mainThreadEditorTabs.ts @@ -213,7 +213,6 @@ export class MainThreadEditorTabs implements MainThreadEditorTabsShape { if (this._tabGroupModel[i].groupId === group.id) { this._tabGroupModel.splice(i, 1); this._groupLookup.delete(group.id); - return; } } }