Skip to content

Commit bf291dd

Browse files
committed
fix: in react ui, text blocks with literal content are not show in Transcript
Signed-off-by: Nick Mitchell <[email protected]>
1 parent 40c832e commit bf291dd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pdl-live-react/src/view/transcript/Block.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ export default function Block({ data }: Props): ReactNode {
101101
}))
102102
.with({ kind: "text" }, (data) => ({
103103
C: ["pdl_text"],
104-
S: !Array.isArray(data.text)
105-
? undefined
106-
: data.text.map((b, idx) => <Block key={idx} data={b} />),
104+
S: !Array.isArray(data.text) ? (
105+
<Block data={data.text} />
106+
) : (
107+
data.text.map((b, idx) => <Block key={idx} data={b} />)
108+
),
107109
}))
108110
.with({ kind: "lastOf" }, (data) => ({
109111
C: ["pdl_lastOf"],

0 commit comments

Comments
 (0)