From 1f5c594f348c507469885af38f34cbbe09ad8fec Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Tue, 19 Jul 2022 09:46:06 +0200 Subject: [PATCH] Don't emit an error if multiple overrides add to a list --- Models/ThemeConfig/Conversion/Validation.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Models/ThemeConfig/Conversion/Validation.ts b/Models/ThemeConfig/Conversion/Validation.ts index 22400569e..bcc24c6b7 100644 --- a/Models/ThemeConfig/Conversion/Validation.ts +++ b/Models/ThemeConfig/Conversion/Validation.ts @@ -246,6 +246,10 @@ class OverrideShadowingCheck extends DesugaringStep { for (const layer of withOverride) { for (const key in overrideAll) { + if(key.endsWith("+") || key.startsWith("+")){ + // This key will _add_ to the list, not overwrite it - so no warning is needed + continue + } if (layer["override"][key] !== undefined || layer["override"]["=" + key] !== undefined) { const w = "The override of layer " + JSON.stringify(layer["builtin"]) + " has a shadowed property: " + key + " is overriden by overrideAll of the theme"; errors.push(w)