fix: determine if rendered or not by node.vC[0] instead of referring to node.pP#4663
Merged
fix: determine if rendered or not by node.vC[0] instead of referring to node.pP#4663
node.vC[0] instead of referring to node.pP#4663Conversation
Because that is slightly more likely to be optimized by the JIT
Bundle size check
Compiler Diagnostics (tsc)
Compiler Diagnostics (typescript-go)
Reported by octocov |
HTTP Performance Benchmark
|
Member
Author
|
Hi @yusukebe Would you please review this? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4663 +/- ##
==========================================
- Coverage 91.43% 91.43% -0.01%
==========================================
Files 173 173
Lines 11377 11373 -4
Branches 3299 3298 -1
==========================================
- Hits 10403 10399 -4
Misses 973 973
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
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.
fix #4661
Summary
This PR fixes DOM insertion anchor resolution in the JSX DOM renderer.
findInsertBeforenow determines whether a node is effectively rendered by checkingnode.vC?.[0](actual virtual children) instead of relying onnode.pP(previous props), which is not a reliable signal for render presence.Problem
In some update flows (especially with fragments/function components,
nullsiblings, and dynamic child insertion), the previous logic could choose the wrong insertion anchor and cause sibling order issues.The author should do the following, if applicable
bun run format:fix && bun run lint:fixto format the code