From df934450965a1db2184edd77b843893b35bd2218 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 19 Feb 2024 12:43:54 -0500 Subject: [PATCH] fix --- .../compiler/phases/3-transform/client/transform-client.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/svelte/src/compiler/phases/3-transform/client/transform-client.js b/packages/svelte/src/compiler/phases/3-transform/client/transform-client.js index 5671bfe34f..139df0afea 100644 --- a/packages/svelte/src/compiler/phases/3-transform/client/transform-client.js +++ b/packages/svelte/src/compiler/phases/3-transform/client/transform-client.js @@ -225,15 +225,12 @@ export function client_component(source, analysis, options) { // Bind static exports to props so that people can access them with bind:x const static_bindings = analysis.exports.map(({ name, alias }) => { - const binding = analysis.instance.scope.get(name); return b.stmt( b.call( '$.bind_prop', b.id('$$props'), b.literal(alias ?? name), - binding?.kind === 'state' || binding?.kind === 'frozen_state' - ? b.call('$.get', b.id(name)) - : b.id(name) + serialize_get_binding(b.id(name), instance_state) ) ); });