From 580fc1ffcf21b4b694863d39455677e3f9b8a4c8 Mon Sep 17 00:00:00 2001 From: Per-Kristian Nordnes Date: Thu, 24 Nov 2016 13:31:12 +0100 Subject: [PATCH] Use key, not node object on getNextText and getPreviousText to avoid deprecation issues in node.getNextBlock and node.getPreviousBlock --- src/models/node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/node.js b/src/models/node.js index addd35f7f..42cda2752 100644 --- a/src/models/node.js +++ b/src/models/node.js @@ -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)