mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-18 13:11:17 +02:00
fix: correct dirty path update for Text nodes (#5842)
* fix: correct dirty path update for Text nodes Previously, the condition used was "if (!Text.isText)" without passing the node, which always evaluated to false. This caused the code to always take the branch intended for non-Text nodes, even for Text nodes. The fix now correctly checks "if (Text.isText(node))" to determine if the node is a Text node. Text nodes, which have no children, will now correctly add only their own path, while non-Text nodes continue to have all their descendant paths added. This change ensures that the dirty path update logic behaves as intended. * Add changeset --------- Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
This commit is contained in:
5
.changeset/clever-moose-exist.md
Normal file
5
.changeset/clever-moose-exist.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate': patch
|
||||
---
|
||||
|
||||
fix: correct dirty path update for Text nodes
|
Reference in New Issue
Block a user