Skip to content

Commit f16fabb

Browse files
committed
update
1 parent 5b80f49 commit f16fabb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/configuration/apiCommunicationUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ export function normalizeCommunication(input: RawCommunication): ApiCommunicatio
2525
}
2626

2727
function normalizeTopic(
28-
topic: { value?: string; type?: string } | { value?: string; type?: string }[] | undefined
28+
topic: { value?: string; type?: string; _?: string } | { value?: string; type?: string; _?: string }[] | undefined
2929
): [Topic] {
3030
if (!topic) {
3131
return [{ value: '' }];
3232
}
3333

3434
if (Array.isArray(topic)) {
35-
const normalized = topic.map((t): Topic => ({ value: t.value ?? t.type ?? '' }));
35+
const normalized = topic.map((t): Topic => ({ value: t._ ?? t.value ?? t.type ?? '' }));
3636
return normalized.length > 0 ? [normalized[0]] : [{ value: '' }];
3737
}
3838

39-
return [{ value: topic.value ?? topic.type ?? '' }];
40-
}
39+
return [{ value: topic._ ?? topic.value ?? topic.type ?? '' }];
40+
}

0 commit comments

Comments
 (0)