Skip to content

Commit 1e55c1f

Browse files
committed
DRY
1 parent 5436855 commit 1e55c1f

File tree

1 file changed

+3
-5
lines changed
  • packages/svelte/src/compiler/phases/3-transform/client/visitors

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ export function ClassBody(node, context) {
121121
body.push(/** @type {PropertyDefinition} */ (context.visit(definition, child_state)));
122122
continue;
123123
}
124+
const member = b.member(b.this, field.key);
125+
126+
const should_proxy = field.type === '$state' && true; // TODO
124127

125128
if (typeof name === 'string' && name[0] === '#') {
126129
let value = definition.value
@@ -138,8 +141,6 @@ export function ClassBody(node, context) {
138141
if (dev) {
139142
call = b.call('$.tag', call, b.literal(`${declaration.id?.name ?? '[class]'}.${name}`));
140143
}
141-
const member = b.member(b.this, field.key);
142-
const should_proxy = field.type === '$state' && true; // TODO
143144

144145
body.push(
145146
b.prop_def(field.key, call),
@@ -164,9 +165,6 @@ export function ClassBody(node, context) {
164165
}
165166
const key = context.state.scope.generate('key');
166167
computed_field_declarations.push(b.let(key));
167-
const member = b.member(b.this, field.key);
168-
169-
const should_proxy = field.type === '$state' && true; // TODO
170168

171169
body.push(
172170
b.prop_def(field.key, call),

0 commit comments

Comments
 (0)