mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-12 18:24:03 +02:00
fix(slate-react): use Text.equals to compare leaf (#4175)
* fix(slate-react): use Text.equals to compare leaf * refactor(slate-react): simplify MenoizedLeaf logic * Create breezy-lizards-travel.md * Update packages/slate-react/src/components/leaf.tsx Co-authored-by: Ian Storm Taylor <ian@ianstormtaylor.com> Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
This commit is contained in:
@@ -104,7 +104,6 @@ const MemoizedLeaf = React.memo(Leaf, (prev, next) => {
|
||||
next.renderLeaf === prev.renderLeaf &&
|
||||
next.renderPlaceholder === prev.renderPlaceholder &&
|
||||
next.text === prev.text &&
|
||||
next.leaf.text === prev.leaf.text &&
|
||||
Text.equals(next.leaf, prev.leaf) &&
|
||||
next.leaf[PLACEHOLDER_SYMBOL] === prev.leaf[PLACEHOLDER_SYMBOL]
|
||||
)
|
||||
|
Reference in New Issue
Block a user