Skip to content

Commit 970565c

Browse files
committed
fix
1 parent 50d350f commit 970565c

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/src/compiler/phases/2-analyze

1 file changed

+1
-1
lines changed

packages/svelte/src/compiler/phases/2-analyze/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ const common_visitors = {
12541254
binding.kind === 'frozen_state' ||
12551255
binding.kind === 'derived') &&
12561256
// We're only concerned with reads here
1257-
parent.type !== 'AssignmentExpression' &&
1257+
(parent.type !== 'AssignmentExpression' || parent.left !== node) &&
12581258
parent.type !== 'UpdateExpression'
12591259
) {
12601260
w.state_referenced_locally(node);

0 commit comments

Comments
 (0)