From 54368558c01fbc87066f986d6f1ba4b8707e9478 Mon Sep 17 00:00:00 2001 From: ComputerGuy <63362464+Ocean-OS@users.noreply.github.com> Date: Sun, 26 Oct 2025 14:44:23 -0700 Subject: [PATCH] fix? --- .../compiler/phases/2-analyze/visitors/ClassBody.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/svelte/src/compiler/phases/2-analyze/visitors/ClassBody.js b/packages/svelte/src/compiler/phases/2-analyze/visitors/ClassBody.js index 65c81c4eb2..ce11887c00 100644 --- a/packages/svelte/src/compiler/phases/2-analyze/visitors/ClassBody.js +++ b/packages/svelte/src/compiler/phases/2-analyze/visitors/ClassBody.js @@ -87,7 +87,10 @@ export function ClassBody(node, context) { for (const child of node.body) { if (child.type === 'PropertyDefinition' && !child.static) { handle(child, child.key, child.value, child.computed && child.key.type !== 'Literal'); - const key = /** @type {string} */ (get_name(child.key)); + const key = get_name(child.key); + if (key === null) { + continue; + } const field = fields.get(key); if (!field) { fields.set(key, [child.value ? 'assigned_prop' : 'prop']); @@ -100,7 +103,11 @@ export function ClassBody(node, context) { if (child.kind === 'constructor') { constructor = child; } else if (!child.computed) { - const key = (child.static ? '@' : '') + get_name(child.key); + const name = get_name(child.key); + if (name === null) { + continue; + } + const key = (child.static ? '@' : '') + name; const field = fields.get(key); if (!field) { fields.set(key, [child.kind]);