Skip to content

Commit 4ed8e87

Browse files
More comments on effective options.
1 parent 44d96d3 commit 4ed8e87

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/web/features/profile/ProfileTagInput.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ export default function ProfileTagInput({
155155
}: ProfileTagInputProps) {
156156
const { t } = useTranslation(PROFILE);
157157

158-
// If any value doesn't map to an option, add a fake option for it.
158+
// In case some value doesn't map to an option, add a fake option for it.
159+
// For example if value is [en, xx] and options is { en: "English", fr: "French" },
160+
// then we extend to { en: "English", fr: "French", xx: "xx" },
161+
// so the all values can be displayed.
159162
const effectiveOptions: Record<string, string> = {
160163
...Object.fromEntries(value.map((k) => [k, k])),
161164
...options,

0 commit comments

Comments
 (0)