mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 18:09:49 +02:00
more readable code
This commit is contained in:
@@ -1110,7 +1110,7 @@ const Node = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const nodes = this.nodes.splice(index, 0, node)
|
const nodes = this.nodes.insert(index, node)
|
||||||
return this.merge({ nodes })
|
return this.merge({ nodes })
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -216,7 +216,7 @@ export function removeNodeOperation(transform, path) {
|
|||||||
const { document } = state
|
const { document } = state
|
||||||
const node = document.assertPath(path)
|
const node = document.assertPath(path)
|
||||||
const inversePath = path.slice(0, -1)
|
const inversePath = path.slice(0, -1)
|
||||||
const inverseIndex = path.slice(-1)
|
const inverseIndex = path[path.length - 1]
|
||||||
|
|
||||||
const inverse = [{
|
const inverse = [{
|
||||||
type: 'insert_node',
|
type: 'insert_node',
|
||||||
|
Reference in New Issue
Block a user