chore: fix error when trying to change invalid super note to another note type

This commit is contained in:
Aman Harwara
2023-08-05 00:48:29 +05:30
parent 89f91178f8
commit de778de951

View File

@@ -57,7 +57,13 @@ const SuperNoteConverter = ({
return note.text
}
return new HeadlessSuperConverter().convertString(note.text, format)
try {
return new HeadlessSuperConverter().convertString(note.text, format)
} catch (error) {
console.error(error)
}
return note.text
}, [format, note])
const componentViewer = useMemo(() => {