fix: text.split (#17842)
This commit is contained in:
parent
0ccd8bdfa8
commit
7ee5cc80a2
1 changed files with 1 additions and 1 deletions
|
|
@ -296,7 +296,7 @@ export function $splitNodeContainingQuery(match: MenuTextMatch): TextNode | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export function textToEditorState(text: string) {
|
export function textToEditorState(text: string) {
|
||||||
const paragraph = text ? text.split('\n') : ['']
|
const paragraph = text && (typeof text === 'string') ? text.split('\n') : ['']
|
||||||
|
|
||||||
return JSON.stringify({
|
return JSON.stringify({
|
||||||
root: {
|
root: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue