Fix editor index checks

This commit is contained in:
Logan Ramos 2022-02-17 09:56:11 -05:00
parent 32a2050665
commit c2e3ba3aef
No known key found for this signature in database
GPG key ID: D9CCFF14F0B18183

View file

@ -244,27 +244,27 @@ export class MainThreadEditorTabs {
return;
}
case GroupModelChangeKind.EDITOR_LABEL:
if (event.editor && event.editorIndex) {
if (event.editor !== undefined && event.editorIndex !== undefined) {
this._onDidTabLabelChange(event.groupId, event.editor, event.editorIndex);
break;
}
case GroupModelChangeKind.EDITOR_OPEN:
if (event.editor && event.editorIndex) {
if (event.editor !== undefined && event.editorIndex !== undefined) {
this._onDidTabOpen(event.groupId, event.editor, event.editorIndex);
break;
}
case GroupModelChangeKind.EDITOR_CLOSE:
if (event.editorIndex) {
if (event.editorIndex !== undefined) {
this._onDidTabClose(event.groupId, event.editorIndex);
break;
}
case GroupModelChangeKind.EDITOR_ACTIVE:
if (event.editorIndex) {
if (event.editorIndex !== undefined) {
this._onDidTabActiveChange(event.groupId, event.editorIndex);
break;
}
case GroupModelChangeKind.EDITOR_DIRTY:
if (event.editorIndex && event.editor) {
if (event.editorIndex !== undefined && event.editor !== undefined) {
this._onDidTabDirty(event.groupId, event.editorIndex, event.editor);
break;
}