mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-15 11:44:05 +02:00
Fix leaf memoization bug (#2766)
* Fix leaf memoization bug * Update leaf.js
This commit is contained in:
committed by
Ian Storm Taylor
parent
fbe70a1f28
commit
4eff9b5a06
@@ -201,10 +201,11 @@ Leaf.propTypes = {
|
||||
|
||||
const MemoizedLeaf = React.memo(Leaf, (prev, next) => {
|
||||
return (
|
||||
next.block === prev.block &&
|
||||
next.index === prev.index &&
|
||||
next.marks === prev.marks &&
|
||||
next.parent === prev.parent &&
|
||||
next.block === prev.block &&
|
||||
next.text === prev.text &&
|
||||
next.annotations.equals(prev.annotations) &&
|
||||
next.decorations.equals(prev.decorations)
|
||||
)
|
||||
|
Reference in New Issue
Block a user