fix: slate cannot get the start point in the node at path [0]
This commit is contained in:
1 parent
de0c53b1b2
commit
64952806b9
1 file changed
+5
@@ -605,6 +605,11 @@ class SlateUtils {
|
|||||||
}
|
}
|
||||||
textChildren.push(child);
|
textChildren.push(child);
|
||||||
}
|
}
|
||||||
|
// If nothing, should preserve empty string
|
||||||
|
// Fix Slate Cannot get the start point in the node at path [0] because it has no start text node.
|
||||||
|
if (!textChildren.length) {
|
||||||
|
textChildren.push({ text: '' });
|
||||||
|
}
|
||||||
|
|
||||||
return textChildren;
|
return textChildren;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user