mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 01:50:06 +02:00
Eliminate duplicates in getBlocksAtRange (#600)
This commit is contained in:
committed by
Ian Storm Taylor
parent
8214641e75
commit
0c18052404
@@ -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()
|
||||
},
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user