1
0
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:
adjourn
2019-05-21 00:37:31 +03:00
committed by Ian Storm Taylor
parent fbe70a1f28
commit 4eff9b5a06

View File

@@ -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)
)