From 5f93015f747ebf45509ef94015e80ee729013b3a Mon Sep 17 00:00:00 2001 From: ComputerGuy <63362464+Ocean-OS@users.noreply.github.com> Date: Thu, 23 Oct 2025 21:12:31 -0700 Subject: [PATCH] fix --- .../compiler/phases/2-analyze/visitors/CallExpression.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/svelte/src/compiler/phases/2-analyze/visitors/CallExpression.js b/packages/svelte/src/compiler/phases/2-analyze/visitors/CallExpression.js index 76d9cecd9a..9db4148a2e 100644 --- a/packages/svelte/src/compiler/phases/2-analyze/visitors/CallExpression.js +++ b/packages/svelte/src/compiler/phases/2-analyze/visitors/CallExpression.js @@ -313,7 +313,7 @@ function is_variable_declaration(parent, context) { * @param {AST.SvelteNode} parent */ function is_class_property_definition(parent) { - return parent.type === 'PropertyDefinition' && !parent.static && !parent.computed; + return parent.type === 'PropertyDefinition' && !parent.static; } /** @@ -325,10 +325,7 @@ function is_class_property_assignment_at_constructor_root(node, context) { node.type === 'AssignmentExpression' && node.operator === '=' && node.left.type === 'MemberExpression' && - node.left.object.type === 'ThisExpression' && - ((node.left.property.type === 'Identifier' && !node.left.computed) || - node.left.property.type === 'PrivateIdentifier' || - node.left.property.type === 'Literal') + node.left.object.type === 'ThisExpression' ) { // MethodDefinition (-5) -> FunctionExpression (-4) -> BlockStatement (-3) -> ExpressionStatement (-2) -> AssignmentExpression (-1) const parent = get_parent(context.path, -5);