From 72e794833c6cda0f25345a3083b05774c3a67920 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 20 Jul 2018 16:54:09 +0200 Subject: [PATCH] Fix when there is no recently opened state --- src/vs/platform/history/electron-main/historyMainService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/history/electron-main/historyMainService.ts b/src/vs/platform/history/electron-main/historyMainService.ts index 5f8f1fb5af7..188900b3e3a 100644 --- a/src/vs/platform/history/electron-main/historyMainService.ts +++ b/src/vs/platform/history/electron-main/historyMainService.ts @@ -244,7 +244,7 @@ export class HistoryMainService implements IHistoryMainService { } private getRecentlyOpenedFromStorage(): IRecentlyOpened { - const storedRecents: ISerializedRecentlyOpened = this.stateService.getItem(HistoryMainService.recentlyOpenedStorageKey); + const storedRecents: ISerializedRecentlyOpened = this.stateService.getItem(HistoryMainService.recentlyOpenedStorageKey) || { workspaces: [], files: [] }; const result: IRecentlyOpened = { workspaces: [], files: storedRecents.files }; for (const workspace of storedRecents.workspaces) { if (typeof workspace === 'string') { -- GitLab