From a4b28b833e76602410b4e14ca72a65cf5906e71d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 9 Aug 2018 11:49:22 +0200 Subject: [PATCH] fix history check --- .../services/history/electron-browser/history.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/services/history/electron-browser/history.ts b/src/vs/workbench/services/history/electron-browser/history.ts index 5cee94d49fb..13c20d4a51e 100644 --- a/src/vs/workbench/services/history/electron-browser/history.ts +++ b/src/vs/workbench/services/history/electron-browser/history.ts @@ -681,13 +681,15 @@ export class HistoryService extends Disposable implements IHistoryService { if (arg2 instanceof EditorInput) { const inputResource = arg2.getResource(); + if (!inputResource) { + return false; + } - let isSupportedFile = true; if (this.partService.isCreated() && !this.fileService.canHandleResource(inputResource)) { - isSupportedFile = false; // make sure to only check this when workbench has started (for https://github.com/Microsoft/vscode/issues/48275) + return false; // make sure to only check this when workbench has started (for https://github.com/Microsoft/vscode/issues/48275) } - return inputResource && isSupportedFile && inputResource.toString() === resource.toString(); + return inputResource.toString() === resource.toString(); } const resourceInput = arg2 as IResourceInput; -- GitLab