Skip to content

Commit 43ff6af

Browse files
committed
Merge pull request microsoft#4744 from Microsoft/ben/fix-4739
New untitiled file not saved on exit (fixes microsoft#4739)
2 parents 1a7c3ee + 7f61950 commit 43ff6af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/vs/workbench/electron-browser/window.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ export class ElectronWindow {
162162
}
163163

164164
public showSaveDialog(options: Electron.Dialog.SaveDialogOptions, callback?: (fileName: string) => void): string {
165-
return dialog.showSaveDialog(this.win, options, callback);
165+
if (callback) {
166+
return dialog.showSaveDialog(this.win, options, callback);
167+
}
168+
169+
return dialog.showSaveDialog(this.win, options);
166170
}
167171

168172
public setFullScreen(fullscreen: boolean): void {

0 commit comments

Comments
 (0)