mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 01:01:40 +03:00
fix: slate cannot get the start point in the node at path [0]
This commit is contained in:
parent
de0c53b1b2
commit
64952806b9
@ -605,6 +605,11 @@ class SlateUtils {
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user