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

Preserve $: label in SSR mode #3726

Merged
merged 3 commits into from
Oct 17, 2019
Merged

Preserve $: label in SSR mode #3726

merged 3 commits into from
Oct 17, 2019

Conversation

Conduitry
Copy link
Member

#2828 and #3469 were already fixed in DOM mode by #3539, but that didn't take care of SSR mode. The logic for SSR mode is slightly different, as we need to not have a wrapping $: and block in cases where we have implicit declarations of the reactive variables (so that they'll correctly be in scope elsewhere).

I think what this means is to check whether d.declaration has a node, and to only put the $: back if it does not. This seems to generate the correct code as far as I can tell, and passes all tests.

@Conduitry Conduitry merged commit dda9a53 into sveltejs:master Oct 17, 2019
@Conduitry Conduitry deleted the gh-2828 branch October 17, 2019 14:06
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