fix: text not string

This commit is contained in:
Joel 2024-09-26 10:15:20 +08:00
parent c74424ed85
commit 9ce9a52a86

View File

@ -296,7 +296,7 @@ export function $splitNodeContainingQuery(match: MenuTextMatch): TextNode | null
}
export function textToEditorState(text: string) {
const paragraph = text.split('\n')
const paragraph = text ? text.split('\n') : []
return JSON.stringify({
root: {