Editor tabs - assertion when setting working set (fix #205241) (#209030)

This commit is contained in:
Benjamin Pasero 2024-03-28 17:20:40 +01:00 committed by GitHub
parent d42fad27b2
commit aae4f6b09e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -472,6 +472,10 @@ export class MainThreadEditorTabs implements MainThreadEditorTabsShape {
* Builds the model from scratch based on the current state of the editor service.
*/
private _createTabsModel(): void {
if (this._editorGroupsService.groups.length === 0) {
return; // skip this invalid state, it may happen when the entire editor area is transitioning to other state ("editor working sets")
}
this._tabGroupModel = [];
this._groupLookup.clear();
this._tabInfoLookup.clear();