mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
fix: undefined text error
This commit is contained in:
parent
a9a9a4316c
commit
1b2f6693ee
@ -21,8 +21,8 @@ const removeTextOp = (op: Automerge.Diff) => (map: any, doc: Element) => {
|
||||
|
||||
const text = node?.text?.[index] || '*'
|
||||
|
||||
if (node) {
|
||||
node.text = node.text?.slice(0, index) + node.text?.slice(index + 1)
|
||||
if (node && node.text) {
|
||||
node.text = node.text.slice(0, index) + node.text.slice(index + 1)
|
||||
}
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user