Skip to content

Commit 8bcee3b

Browse files
committed
remove unneeded variable
1 parent 06e56a4 commit 8bcee3b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@ export class NativeWorkingCopyBackupTracker extends WorkingCopyBackupTracker imp
304304
}
305305

306306
private doSaveAllBeforeShutdown(workingCopies: IWorkingCopy[], reason: SaveReason): Promise<void> {
307-
const modifiedWorkingCopies = workingCopies;
308-
309307
return this.withProgressAndCancellation(async () => {
310308

311309
// Skip save participants on shutdown for performance reasons
@@ -314,7 +312,7 @@ export class NativeWorkingCopyBackupTracker extends WorkingCopyBackupTracker imp
314312
// First save through the editor service if we save all to benefit
315313
// from some extras like switching to untitled modified editors before saving.
316314
let result: boolean | undefined = undefined;
317-
if (modifiedWorkingCopies.length === this.workingCopyService.modifiedCount) {
315+
if (workingCopies.length === this.workingCopyService.modifiedCount) {
318316
result = (await this.editorService.saveAll({
319317
includeUntitled: { includeScratchpad: true },
320318
...saveOptions
@@ -324,7 +322,7 @@ export class NativeWorkingCopyBackupTracker extends WorkingCopyBackupTracker imp
324322
// If we still have modified working copies, save those directly
325323
// unless the save was not successful (e.g. cancelled)
326324
if (result !== false) {
327-
await Promises.settled(modifiedWorkingCopies.map(workingCopy => workingCopy.isModified() ? workingCopy.save(saveOptions) : Promise.resolve(true)));
325+
await Promises.settled(workingCopies.map(workingCopy => workingCopy.isModified() ? workingCopy.save(saveOptions) : Promise.resolve(true)));
328326
}
329327
}, localize('saveBeforeShutdown', "Saving editors with unsaved changes is taking a bit longer..."));
330328
}

0 commit comments

Comments
 (0)