From 3408691c13470346a119141e57aa74b302464a4a Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 13 Nov 2016 18:54:01 -0800 Subject: [PATCH] Fix empty workspace window reload Fixes #15400 --- src/vs/code/electron-main/window.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 7bbacea1a5c..0a0013a2bf4 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -431,9 +431,11 @@ export class VSCodeWindow { delete configuration.filesToDiff; // Update untitled files to restore so they come through in the reloaded window - configuration.untitledToRestore = this.backupService.getWorkspaceUntitledFileBackupsSync(Uri.file(configuration.workspacePath)).map(filePath => { - return { filePath }; - }); + if (configuration.workspacePath) { + configuration.untitledToRestore = this.backupService.getWorkspaceUntitledFileBackupsSync(Uri.file(configuration.workspacePath)).map(filePath => { + return { filePath }; + }); + } // Some configuration things get inherited if the window is being reloaded and we are // in plugin development mode. These options are all development related. -- GitLab