Skip to content

Commit 80897ce

Browse files
fix(packages/shared-components): handle undefined text for slate conversion (#4956)
1 parent e5ee90c commit 80897ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/shared-components/src/utils/slateMdConversion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export const convertToSlate = (mdObj?: string | null) => {
187187
}
188188

189189
const formatText = (input: any) => {
190-
if (input.text === '') {
190+
if (!input || !input.text || input.text === '') {
191191
return ''
192192
}
193193
return serialize({

0 commit comments

Comments
 (0)