1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-01-19 14:27:07 +01:00

fix(schema): previous node and child node may be exactly the same (#2493)

This commit is contained in:
Akumatus 2018-12-12 03:32:06 +08:00 committed by Ian Storm Taylor
parent 76a88a649a
commit fb60d4dfb7

View File

@ -382,7 +382,7 @@ function validateNodes(node, rule, rules = []) {
function nextChild() {
index += 1
previous = child
previous = index ? children.get(index - 1) : null
child = children.get(index)
next = children.get(index + 1)
if (!child) return false