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

Fix for attribute state loss on first custom element after HMR #22

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

patricknelson
Copy link
Owner

Fix for #21: Ensure that custom element attribute state is not lost after HMR updates and that we persist props the same way that normal HMR does when done entirely within Svelte (i.e. restore defaults after HMR only if prop is undefined).

Copy link

vercel bot commented Nov 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelte-retag ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 17, 2023 8:10pm

…fter HMR updates and that we persist props the same way that normal HMR does when done entirely within Svelte (i.e. restore defaults after HMR only if prop is undefined).
@patricknelson patricknelson force-pushed the issue-21-restore-attribute-state-after-hmr branch from d74860e to 47d2352 Compare November 17, 2023 20:10
@patricknelson patricknelson merged commit c777046 into main Nov 17, 2023
2 checks passed
@patricknelson
Copy link
Owner Author

patricknelson commented Nov 17, 2023

Will post a full root analysis, including an explanation of how/why this fixes the issue in #21 shortly.

See: #21 (comment)

@patricknelson patricknelson deleted the issue-21-restore-attribute-state-after-hmr branch November 17, 2023 23:05
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.

1 participant