mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-22 15:02:51 +02:00
improve mark handling performance for large selections (#926)
This commit is contained in:
committed by
Ian Storm Taylor
parent
37ba8e9e6d
commit
c0d82c0392
@@ -904,7 +904,8 @@ const Node = {
|
|||||||
return this
|
return this
|
||||||
.getCharactersAtRange(range)
|
.getCharactersAtRange(range)
|
||||||
.reduce((memo, char) => {
|
.reduce((memo, char) => {
|
||||||
return memo.concat(char.marks.toArray())
|
char.marks.toArray().forEach(c => memo.push(c))
|
||||||
|
return memo
|
||||||
}, [])
|
}, [])
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user