1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-19 13:41:19 +02:00

fix unwrapBlockAtRange disorder (#2512)

This commit is contained in:
Akumatus
2019-01-08 02:05:03 +08:00
committed by Sunny Hirai
parent 92c1ffbcd3
commit 09db2c93b6

View File

@@ -1110,7 +1110,7 @@ Commands.unwrapBlockAtRange = (editor, range, properties) => {
wrappers.forEach(block => {
const first = block.nodes.first()
const last = block.nodes.last()
const parent = document.getParent(block.key)
const parent = editor.value.document.getParent(block.key)
const index = parent.nodes.indexOf(block)
const children = block.nodes.filter(child => {