From 0c18052404ddec86fad950c9ca706b68e8b520ed Mon Sep 17 00:00:00 2001 From: Nicolas Gaborit Date: Tue, 14 Feb 2017 01:31:16 +0100 Subject: [PATCH] Eliminate duplicates in getBlocksAtRange (#600) --- src/models/node.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/models/node.js b/src/models/node.js index 2b4e66e35..a082443fe 100644 --- a/src/models/node.js +++ b/src/models/node.js @@ -260,6 +260,7 @@ const Node = { return this .getTexts() .map(text => this.getClosestBlock(text.key)) + // Eliminate duplicates .toOrderedSet() .toList() }, @@ -275,6 +276,9 @@ const Node = { return this .getTextsAtRange(range) .map(text => this.getClosestBlock(text.key)) + // Eliminate duplicates + .toOrderedSet() + .toList() }, /**