File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,16 @@ export function normalizeCommunication(input: RawCommunication): ApiCommunicatio
25
25
}
26
26
27
27
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
29
29
) : [ Topic ] {
30
30
if ( ! topic ) {
31
31
return [ { value : '' } ] ;
32
32
}
33
33
34
34
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 ?? '' } ) ) ;
36
36
return normalized . length > 0 ? [ normalized [ 0 ] ] : [ { value : '' } ] ;
37
37
}
38
38
39
- return [ { value : topic . value ?? topic . type ?? '' } ] ;
40
- }
39
+ return [ { value : topic . _ ?? topic . value ?? topic . type ?? '' } ] ;
40
+ }
You can’t perform that action at this time.
0 commit comments