File tree Expand file tree Collapse file tree
workbench/electron-browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,8 +135,12 @@ export class BackupService implements IBackupService {
135135 }
136136
137137 return this . load ( ) . then ( ( ) => {
138- this . fileContent . folderWorkspaces [ this . workspaceResource . fsPath ] = this . fileContent . folderWorkspaces [ this . workspaceResource . fsPath ] . filter ( value => value !== resource . fsPath ) ;
139- return this . save ( ) ;
138+ const workspace = this . fileContent . folderWorkspaces [ this . workspaceResource . fsPath ] ;
139+ if ( workspace ) {
140+ this . fileContent . folderWorkspaces [ this . workspaceResource . fsPath ] = workspace . filter ( value => value !== resource . fsPath ) ;
141+ return this . save ( ) ;
142+ }
143+ return TPromise . as ( void 0 ) ;
140144 } ) ;
141145 }
142146
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ export class WorkbenchShell {
247247
248248 // Backup
249249 const backupService = instantiationService . createInstance ( BackupService ) ;
250- backupService . setCurrentWorkspace ( this . contextService . getWorkspace ( ) . resource ) ;
250+ backupService . setCurrentWorkspace ( this . contextService . getWorkspace ( ) ? this . contextService . getWorkspace ( ) . resource : null ) ;
251251 serviceCollection . set ( IBackupService , backupService ) ;
252252
253253 // Storage
You can’t perform that action at this time.
0 commit comments