From 496e556a7a288466f8d030448366b2078cacefa4 Mon Sep 17 00:00:00 2001 From: AntoineGautier Date: Tue, 13 Jan 2026 15:36:52 +0100 Subject: [PATCH] Include component name in path for nested modifications --- server/src/parser/modification.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/src/parser/modification.ts b/server/src/parser/modification.ts index fe1c6d72..b1e35837 100644 --- a/server/src/parser/modification.ts +++ b/server/src/parser/modification.ts @@ -248,7 +248,9 @@ function unpackModblock(props: ModificationProps) { ) as mj.ClassMod; // Additional modifiers can be attached to choice if (classModification) { - mods = getModificationList(classModification, basePath, value); + // Include component name in path for nested modifications + const nestedBasePath = [basePath, name].filter((s) => s).join("."); + mods = getModificationList(classModification, nestedBasePath, value); // TODO: getModificationList should handle redeclares but it is not // correctly unpacking nested modifiers - this is a bug // kludge: remove nested modifiers @@ -264,7 +266,9 @@ function unpackModblock(props: ModificationProps) { const modType = modElement?.type; typePath = modType ? modType : baseType; } - mods = getModificationList(mod as mj.ClassMod, basePath, typePath); //mod.class_modification + // Include component name in path for nested modifications + const nestedBasePath = [basePath, name].filter((s) => s).join("."); + mods = getModificationList(mod as mj.ClassMod, nestedBasePath, typePath); } }