diff --git a/meteor/client/ui/Settings/helpers/config-manifest-table-entry-selector.ts b/meteor/client/ui/Settings/helpers/config-manifest-table-entry-selector.ts index 080b45f22b..5e7d646676 100644 --- a/meteor/client/ui/Settings/helpers/config-manifest-table-entry-selector.ts +++ b/meteor/client/ui/Settings/helpers/config-manifest-table-entry-selector.ts @@ -32,7 +32,12 @@ class ConfigManifestTableEntrySelector { const options = sourceTable.flatMap((sourceRow) => this.getOptionsFromSourceRow(sourceRow, targetRow, item)) options.push({ value: DEFAULT_VALUE_FOR_NO_AVAILABLE_OPTION, label: DEFAULT_VALUE_FOR_NO_AVAILABLE_OPTION }) - return options + return this.removeDuplicateOptions(options) + } + + private removeDuplicateOptions(options: SelectOption[]): SelectOption[] { + const map: Map = new Map(options.map((option) => [option.value, option])) + return [...map.values()] } public getOptionsFromSourceRow(