Skip to content

Commit 7764b06

Browse files
author
Benjamin Pasero
committed
💄
1 parent 5b7aa98 commit 7764b06

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

src/vs/platform/files/node/diskFileSystemProvider.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,8 @@ export class DiskFileSystemProvider extends Disposable implements
544544

545545
// Buffer requests for recursive watching to decide on right watcher
546546
// that supports potentially watching more than one folder at once
547-
this.recursiveWatchRequestDelayer.trigger(() => {
547+
this.recursiveWatchRequestDelayer.trigger(async () => {
548548
this.doRefreshRecursiveWatchers();
549-
550-
return Promise.resolve();
551549
});
552550
}
553551

src/vs/workbench/browser/parts/editor/editorGroupView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
894894
private async doShowEditor(editor: EditorInput, active: boolean, options?: EditorOptions): Promise<IEditorPane | undefined> {
895895

896896
// Show in editor control if the active editor changed
897-
let openEditorPromise: Promise<IEditorPane | undefined>;
897+
let openEditorPromise: Promise<IEditorPane | undefined> | undefined;
898898
if (active) {
899899
openEditorPromise = (async () => {
900900
try {
@@ -915,7 +915,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
915915
}
916916
})();
917917
} else {
918-
openEditorPromise = Promise.resolve(undefined); // inactive: return undefined as result to signal this
918+
openEditorPromise = undefined; // inactive: return undefined as result to signal this
919919
}
920920

921921
// Show in title control after editor control because some actions depend on it

src/vs/workbench/common/editor/diffEditorModel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export class DiffEditorModel extends EditorModel {
3232

3333
async load(): Promise<EditorModel> {
3434
await Promise.all([
35-
this._originalModel ? this._originalModel.load() : Promise.resolve(undefined),
36-
this._modifiedModel ? this._modifiedModel.load() : Promise.resolve(undefined),
35+
this._originalModel?.load(),
36+
this._modifiedModel?.load(),
3737
]);
3838

3939
return this;

src/vs/workbench/contrib/backup/electron-browser/backupTracker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export class NativeBackupTracker extends BackupTracker implements IWorkbenchCont
228228
// If we still have dirty working copies, save those directly
229229
// unless the save was not successful (e.g. cancelled)
230230
if (result !== false) {
231-
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.save(saveOptions) : Promise.resolve(true)));
231+
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.save(saveOptions) : true));
232232
}
233233
}
234234

@@ -244,7 +244,7 @@ export class NativeBackupTracker extends BackupTracker implements IWorkbenchCont
244244

245245
// If we still have dirty working copies, revert those directly
246246
// unless the revert operation was not successful (e.g. cancelled)
247-
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.revert(revertOptions) : Promise.resolve()));
247+
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.revert(revertOptions) : undefined));
248248
}
249249

250250
private noVeto(backupsToDiscard: IWorkingCopy[]): boolean | Promise<boolean> {

0 commit comments

Comments
 (0)