From 3427e1a15ae777b548bd121226e047c261e26da2 Mon Sep 17 00:00:00 2001 From: Johannes Faltermeier Date: Mon, 7 Aug 2023 13:34:07 +0200 Subject: [PATCH] Address Review Comments #12713 --- .../browser/views/components/preference-select-input.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/preferences/src/browser/views/components/preference-select-input.ts b/packages/preferences/src/browser/views/components/preference-select-input.ts index a4d3fa5286a33..81a806a2f7bc0 100644 --- a/packages/preferences/src/browser/views/components/preference-select-input.ts +++ b/packages/preferences/src/browser/views/components/preference-select-input.ts @@ -29,14 +29,15 @@ import { escapeInvisibleChars } from '@theia/core/lib/common/strings'; export class PreferenceSelectInputRenderer extends PreferenceLeafNodeRenderer { protected readonly selectComponent = React.createRef(); - protected readonly selectOptions: SelectOption[] = []; + + protected selectOptions: SelectOption[] = []; protected get enumValues(): JSONValue[] { return this.preferenceNode.preference.data.enum!; } protected updateSelectOptions(): void { - this.selectOptions.splice(0); + const updatedSelectOptions: SelectOption[] = []; const values = this.enumValues; const preferenceData = this.preferenceNode.preference.data; const defaultValue = preferenceData.default; @@ -52,7 +53,7 @@ export class PreferenceSelectInputRenderer extends PreferenceLeafNodeRenderer