Skip to content

Conversation

jeremy-deutsch
Copy link
Contributor

Resolves #9966.

This PR adds unary and binary expressions to the list of cases where expressions being assigned to state don't get wrapped in $.proxy() in the generated output.

Unary and binary expressions (e.g. +x, !x, x + y, x in y) can never produce object values, so it doesn't make sense to wrap them in $.proxy().

Copy link

changeset-bot bot commented Dec 21, 2023

🦋 Changeset detected

Latest commit: b871f95

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Dec 21, 2023

@jeremy-deutsch is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

@trueadm
Copy link
Contributor

trueadm commented Dec 27, 2023

@jeremy-deutsch Please could you add a changeset for this PR? Thanks :)

@jeremy-deutsch
Copy link
Contributor Author

@jeremy-deutsch Please could you add a changeset for this PR? Thanks :)

Sure thing!

@trueadm trueadm merged commit 346041f into sveltejs:main Jan 2, 2024
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.

Svelte 5: unnecessary $.proxy() generated for += assignment

2 participants