From 8c74e8cd47d7840bccf8d787470bfa10e19c7c6f Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 23 Apr 2020 10:18:50 +0200 Subject: [PATCH] debt - remove unused conditional --- src/vs/workbench/contrib/customEditor/browser/customEditors.ts | 2 +- src/vs/workbench/contrib/files/browser/fileActions.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/customEditor/browser/customEditors.ts b/src/vs/workbench/contrib/customEditor/browser/customEditors.ts index 5d6073ed451..0c2b2904f64 100644 --- a/src/vs/workbench/contrib/customEditor/browser/customEditors.ts +++ b/src/vs/workbench/contrib/customEditor/browser/customEditors.ts @@ -170,7 +170,7 @@ export class CustomEditorService extends Disposable implements ICustomEditorServ // And persist the setting if (pick) { const newAssociation: CustomEditorAssociation = { viewType: pick, filenamePattern: '*' + resourceExt }; - const currentAssociations = [...this.configurationService.getValue(customEditorsAssociationsSettingId)] || []; + const currentAssociations = [...this.configurationService.getValue(customEditorsAssociationsSettingId)]; // First try updating existing association for (let i = 0; i < currentAssociations.length; ++i) { diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index 919bb81e544..5608ef03257 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -608,7 +608,7 @@ export class ReopenResourcesAction extends Action { // And persist the setting if (pick && id) { const newAssociation: CustomEditorAssociation = { viewType: id, filenamePattern: '*' + resourceExt }; - const currentAssociations = [...this.configurationService.getValue(customEditorsAssociationsSettingId)] || []; + const currentAssociations = [...this.configurationService.getValue(customEditorsAssociationsSettingId)]; // First try updating existing association for (let i = 0; i < currentAssociations.length; ++i) { -- GitLab