1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-29 01:50:06 +02:00

more readable code

This commit is contained in:
Soreine
2016-11-09 18:02:18 +01:00
parent 9609865f0a
commit ddf730356b
2 changed files with 2 additions and 2 deletions

View File

@@ -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 })
},

View File

@@ -216,7 +216,7 @@ export function removeNodeOperation(transform, path) {
const { document } = state
const node = document.assertPath(path)
const inversePath = path.slice(0, -1)
const inverseIndex = path.slice(-1)
const inverseIndex = path[path.length - 1]
const inverse = [{
type: 'insert_node',