mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-18 13:11:17 +02:00
fix performance issue in Leaf (#158)
This commit is contained in:
committed by
Ian Storm Taylor
parent
fe89247a24
commit
f19f39a8b3
@@ -127,10 +127,11 @@ class Leaf extends React.Component {
|
||||
})
|
||||
|
||||
const style = marks.reduce((memo, mark) => {
|
||||
return {
|
||||
...memo,
|
||||
...renderMark(mark, marks),
|
||||
}
|
||||
const renderedMark = renderMark(mark, marks)
|
||||
Object.keys(renderedMark).forEach((k) => {
|
||||
memo[k] = renderedMark[k]
|
||||
})
|
||||
return memo
|
||||
}, {})
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user