Skip to content

Commit b1cc424

Browse files
committed
tweak
1 parent 0cac3d2 commit b1cc424

File tree

1 file changed

+1
-5
lines changed
  • packages/svelte/src/compiler/phases/2-analyze/visitors

1 file changed

+1
-5
lines changed

packages/svelte/src/compiler/phases/2-analyze/visitors/ClassBody.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,7 @@ export function ClassBody(node, context) {
7676
handle(child, child.key, child.value);
7777
}
7878

79-
if (
80-
child.type === 'MethodDefinition' &&
81-
child.key.type === 'Identifier' &&
82-
child.key.name === 'constructor'
83-
) {
79+
if (child.type === 'MethodDefinition' && child.kind === 'constructor') {
8480
constructor = child;
8581
}
8682
}

0 commit comments

Comments
 (0)