mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-06 15:26:34 +02:00
Merge pull request #453 from skogsmaskin/master
Avoid deprecation warnings in node.getNextBlock and node.getPreviousBlock
This commit is contained in:
@@ -747,7 +747,7 @@ const Node = {
|
|||||||
last = block.getLastText()
|
last = block.getLastText()
|
||||||
}
|
}
|
||||||
|
|
||||||
const next = this.getNextText(last)
|
const next = this.getNextText(last.key)
|
||||||
if (!next) return null
|
if (!next) return null
|
||||||
|
|
||||||
return this.getClosestBlock(next.key)
|
return this.getClosestBlock(next.key)
|
||||||
@@ -973,7 +973,7 @@ const Node = {
|
|||||||
first = block.getFirstText()
|
first = block.getFirstText()
|
||||||
}
|
}
|
||||||
|
|
||||||
const previous = this.getPreviousText(first)
|
const previous = this.getPreviousText(first.key)
|
||||||
if (!previous) return null
|
if (!previous) return null
|
||||||
|
|
||||||
return this.getClosestBlock(previous.key)
|
return this.getClosestBlock(previous.key)
|
||||||
|
Reference in New Issue
Block a user