Skip to content

Commit 3c71375

Browse files
authored
Added an extra if to check if the value provided is a part of the optionList (#3707)
1 parent a86b61b commit 3c71375

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/features/options/getCommaSeparatedOptionsToText.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ export function getCommaSeparatedOptionsToText(
1414
const out: { [key: string]: string } = {};
1515
split?.forEach((part) => {
1616
const textKey = optionList.find((option) => option.value === part)?.label || '';
17-
out[part] = langAsString(textKey) || part;
17+
if (textKey) {
18+
out[part] = langAsString(textKey) || part;
19+
}
1820
});
1921

2022
return out;

0 commit comments

Comments
 (0)