mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-21 23:53:50 +01:00
fix performance issue in Leaf (#158)
This commit is contained in:
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 (
|
||||
|
Loading…
x
Reference in New Issue
Block a user