Skip to content

Commit 35cbd04

Browse files
committed
tweak
1 parent a7a08d5 commit 35cbd04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/VariableDeclaration.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function VariableDeclaration(node, context) {
8989
binding.kind === 'bindable_prop' &&
9090
should_proxy(initial, context.state.scope)
9191
) {
92-
initial = b.call('$.proxy', initial, dev ? b.literal(id.name) : undefined);
92+
initial = b.call('$.proxy', initial, dev && b.literal(id.name));
9393
}
9494

9595
if (is_prop_source(binding, context.state)) {
@@ -132,7 +132,7 @@ export function VariableDeclaration(node, context) {
132132
const is_proxy = should_proxy(value, context.state.scope);
133133

134134
if (rune === '$state' && is_proxy) {
135-
value = b.call('$.proxy', value, dev ? b.literal(id.name) : undefined);
135+
value = b.call('$.proxy', value, dev && b.literal(id.name));
136136
}
137137

138138
if (is_state) {

0 commit comments

Comments
 (0)