mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-04-21 22:02:05 +02:00
Use key, not node object on getNextText and getPreviousText to avoid deprecation issues in node.getNextBlock and node.getPreviousBlock
This commit is contained in:
parent
1c396c11d9
commit
580fc1ffcf
@ -747,7 +747,7 @@ const Node = {
|
||||
last = block.getLastText()
|
||||
}
|
||||
|
||||
const next = this.getNextText(last)
|
||||
const next = this.getNextText(last.key)
|
||||
if (!next) return null
|
||||
|
||||
return this.getClosestBlock(next.key)
|
||||
@ -973,7 +973,7 @@ const Node = {
|
||||
first = block.getFirstText()
|
||||
}
|
||||
|
||||
const previous = this.getPreviousText(first)
|
||||
const previous = this.getPreviousText(first.key)
|
||||
if (!previous) return null
|
||||
|
||||
return this.getClosestBlock(previous.key)
|
||||
|
Loading…
x
Reference in New Issue
Block a user