We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50d350f commit 970565cCopy full SHA for 970565c
packages/svelte/src/compiler/phases/2-analyze/index.js
@@ -1254,7 +1254,7 @@ const common_visitors = {
1254
binding.kind === 'frozen_state' ||
1255
binding.kind === 'derived') &&
1256
// We're only concerned with reads here
1257
- parent.type !== 'AssignmentExpression' &&
+ (parent.type !== 'AssignmentExpression' || parent.left !== node) &&
1258
parent.type !== 'UpdateExpression'
1259
) {
1260
w.state_referenced_locally(node);
0 commit comments