1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-28 09:29:49 +02:00

fix parse error

This commit is contained in:
Ian Storm Taylor
2019-12-07 15:27:22 -05:00
parent eb6631a677
commit 043a5c1709
2 changed files with 4 additions and 6 deletions

View File

@@ -656,7 +656,7 @@ export const NodeTransforms = {
}
Editor.setNodes(editor, obj, options)
}
},
/**
* Unwrap the nodes at a location from a parent node, splitting the parent if

View File

@@ -20,19 +20,17 @@ const withSchema = defineSchema([
const type = index === 0 ? 'title' : 'paragraph'
switch (code) {
case 'child_invalid': {
case 'child_invalid':
case 'child_max_invalid': {
Editor.setNodes(editor, { type }, { at: path })
break
}
case 'child_min_invalid': {
const block = { type, children: [{ text: '' }] }
Editor.insertNodes(editor, block, { at: path })
break
}
case 'child_max_invalid': {
Editor.setNodes(editor, { type }, { at: path })
break
}
}
},
},