提交 7764b06f 编写于 作者: B Benjamin Pasero

💄

上级 5b7aa982
......@@ -544,10 +544,8 @@ export class DiskFileSystemProvider extends Disposable implements
// Buffer requests for recursive watching to decide on right watcher
// that supports potentially watching more than one folder at once
this.recursiveWatchRequestDelayer.trigger(() => {
this.recursiveWatchRequestDelayer.trigger(async () => {
this.doRefreshRecursiveWatchers();
return Promise.resolve();
});
}
......
......@@ -894,7 +894,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
private async doShowEditor(editor: EditorInput, active: boolean, options?: EditorOptions): Promise<IEditorPane | undefined> {
// Show in editor control if the active editor changed
let openEditorPromise: Promise<IEditorPane | undefined>;
let openEditorPromise: Promise<IEditorPane | undefined> | undefined;
if (active) {
openEditorPromise = (async () => {
try {
......@@ -915,7 +915,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
}
})();
} else {
openEditorPromise = Promise.resolve(undefined); // inactive: return undefined as result to signal this
openEditorPromise = undefined; // inactive: return undefined as result to signal this
}
// Show in title control after editor control because some actions depend on it
......
......@@ -32,8 +32,8 @@ export class DiffEditorModel extends EditorModel {
async load(): Promise<EditorModel> {
await Promise.all([
this._originalModel ? this._originalModel.load() : Promise.resolve(undefined),
this._modifiedModel ? this._modifiedModel.load() : Promise.resolve(undefined),
this._originalModel?.load(),
this._modifiedModel?.load(),
]);
return this;
......
......@@ -228,7 +228,7 @@ export class NativeBackupTracker extends BackupTracker implements IWorkbenchCont
// If we still have dirty working copies, save those directly
// unless the save was not successful (e.g. cancelled)
if (result !== false) {
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.save(saveOptions) : Promise.resolve(true)));
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.save(saveOptions) : true));
}
}
......@@ -244,7 +244,7 @@ export class NativeBackupTracker extends BackupTracker implements IWorkbenchCont
// If we still have dirty working copies, revert those directly
// unless the revert operation was not successful (e.g. cancelled)
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.revert(revertOptions) : Promise.resolve()));
await Promise.all(workingCopies.map(workingCopy => workingCopy.isDirty() ? workingCopy.revert(revertOptions) : undefined));
}
private noVeto(backupsToDiscard: IWorkingCopy[]): boolean | Promise<boolean> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册