mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 02:19:52 +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
|
return this
|
||||||
.getTexts()
|
.getTexts()
|
||||||
.map(text => this.getClosestBlock(text.key))
|
.map(text => this.getClosestBlock(text.key))
|
||||||
|
// Eliminate duplicates
|
||||||
.toOrderedSet()
|
.toOrderedSet()
|
||||||
.toList()
|
.toList()
|
||||||
},
|
},
|
||||||
@@ -275,6 +276,9 @@ const Node = {
|
|||||||
return this
|
return this
|
||||||
.getTextsAtRange(range)
|
.getTextsAtRange(range)
|
||||||
.map(text => this.getClosestBlock(text.key))
|
.map(text => this.getClosestBlock(text.key))
|
||||||
|
// Eliminate duplicates
|
||||||
|
.toOrderedSet()
|
||||||
|
.toList()
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user