diff --git a/packages/svelte/src/compiler/phases/2-analyze/visitors/BindDirective.js b/packages/svelte/src/compiler/phases/2-analyze/visitors/BindDirective.js index 8127d22ba3..e116b0fb5c 100644 --- a/packages/svelte/src/compiler/phases/2-analyze/visitors/BindDirective.js +++ b/packages/svelte/src/compiler/phases/2-analyze/visitors/BindDirective.js @@ -45,7 +45,7 @@ export function BindDirective(node, context) { e.bind_invalid_value(node.expression); } - if (binding?.kind === 'derived' && !binding.reassigned) { + if (binding?.kind === 'derived' && binding.declaration_kind === 'const') { e.constant_binding(node.expression, 'derived state'); }