Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: follow-up to #11197 #11213

Merged
merged 4 commits into from
Apr 18, 2024
Merged

chore: follow-up to #11197 #11213

merged 4 commits into from
Apr 18, 2024

Conversation

Rich-Harris
Copy link
Member

couple of small follow-ups to #11197:

  • in push_template_node, effect is almost always the current_effect. we can use a default value and make the callsites more concise
  • the if (current_dom[0].nodeType === 8) stuff makes me very nervous. feels like the sort of thing that could break easily, e.g. if preserveComments was enabled. I've felt for a while that we should probably just have a field on EachItem containing the opening anchor. This PR adds one. It means that an additional empty text node is created per each item (except during hydration, when the existing comments can be used), but it feels a bit more robust to me and avoids all the get_first_child calls

Copy link

changeset-bot bot commented Apr 17, 2024

⚠️ No Changeset found

Latest commit: 2d5e34b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Rich-Harris Rich-Harris changed the title Tidy up chore: follow-up to #11197 Apr 17, 2024
@trueadm trueadm merged commit 70b47de into main Apr 18, 2024
8 checks passed
@Rich-Harris Rich-Harris deleted the tidy-up branch April 19, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants