fix: ignore delayed field changes on removed nodes - #1789
Open
sridharkalaibala wants to merge 1 commit into
Open
sridharkalaibala wants to merge 1 commit into
sridharkalaibala wants to merge 1 commit into
Conversation
Owner
|
Thanks Shridhar for the PR's and issues that you've opened. I'm not sure when I can look into them but will keep you posted. |
Author
|
Thanks for the update, Jos. I appreciate you keeping me informed. I’ll leave the existing PRs ready for when you have review time and follow up on any questions or requested changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renaming an object key and immediately calling
editor.update()with replacement data can remove that node before its debounced field-change callback runs. The callback then dereferencesthis.parent.getInternalPath()with a null parent and throws.Ignore the delayed field change when the node no longer has a parent, following the approach suggested in #1498. A regression test schedules the real debounce and removes the node before it fires; a second test confirms attached-node edits still record their action and previous field value.
Validation:
npm run build-and-testpasses (build, 71 tests, StandardJS lint). Actual Chromium reproduction dispatches a key-edit input event and immediately callseditor.update({ replacement: 42 }): original bundle throws the reported null-parent error; rebuilt bundle produces no page error and preserves the replacement data. Diff check passes. Prepared with AI assistance and locally verified.Fixes #1498.