From 59f374c3cff6c3ba210405c357a94910df7b7d97 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Thu, 22 Aug 2024 17:34:41 +0100 Subject: [PATCH] remove proxy assign derived --- .../svelte/src/compiler/phases/3-transform/client/utils.js | 1 + .../3-transform/client/visitors/AssignmentExpression.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/svelte/src/compiler/phases/3-transform/client/utils.js b/packages/svelte/src/compiler/phases/3-transform/client/utils.js index 7d662629da..0f3f450a46 100644 --- a/packages/svelte/src/compiler/phases/3-transform/client/utils.js +++ b/packages/svelte/src/compiler/phases/3-transform/client/utils.js @@ -50,6 +50,7 @@ export function build_getter(node, state) { * @param {PrivateIdentifier | string} proxy_reference */ export function build_proxy_reassignment(value, proxy_reference) { + debugger return dev ? b.call( '$.proxy', diff --git a/packages/svelte/src/compiler/phases/3-transform/client/visitors/AssignmentExpression.js b/packages/svelte/src/compiler/phases/3-transform/client/visitors/AssignmentExpression.js index 4365870bf7..288f2d0cfa 100644 --- a/packages/svelte/src/compiler/phases/3-transform/client/visitors/AssignmentExpression.js +++ b/packages/svelte/src/compiler/phases/3-transform/client/visitors/AssignmentExpression.js @@ -109,7 +109,10 @@ function build_assignment(operator, left, right, context) { context.state.analysis.runes && should_proxy(value, context.state.scope) ) { - value = binding.kind === 'raw_state' ? value : build_proxy_reassignment(value, object.name); + value = + binding.kind === 'raw_state' || binding.kind === 'derived' + ? value + : build_proxy_reassignment(value, object.name); } return transform.assign(object, value);