Merge pull request #849 from NklsCh/master

Fix: Prevent Matugen to override user settings with config defaults
This commit is contained in:
davfsa
2025-03-19 17:33:53 +01:00
committed by GitHub

View File

@@ -55,14 +55,14 @@ async function extractMatugenizedVariables(matugenColors: MatugenColors): Promis
continue;
}
const initialValue = opt.initial;
const value = opt.value;
if (!isHexColor(initialValue) && matugenColors !== undefined) {
result.push(`$${name.replace('theme.', '').split('.').join('-')}: ${initialValue};`);
if (!isHexColor(value) && matugenColors !== undefined) {
result.push(`$${name.replace('theme.', '').split('.').join('-')}: ${value};`);
continue;
}
const matugenColor = getMatugenHex(initialValue as HexColor, matugenColors);
const matugenColor = getMatugenHex(value as HexColor, matugenColors);
result.push(`$${name.replace('theme.', '').split('.').join('-')}: ${matugenColor};`);
}