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