1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-29 18:09:49 +02:00

Eliminate duplicates in getBlocksAtRange (#600)

This commit is contained in:
Nicolas Gaborit
2017-02-14 01:31:16 +01:00
committed by Ian Storm Taylor
parent 8214641e75
commit 0c18052404

View File

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