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.
#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.