fix: removed opt.initial becouse opt.value will always hold either the user defined value or the default

This commit is contained in:
Niklas Choinowski
2025-03-19 06:54:48 +01:00
parent b4506130f9
commit b9aa6854f6

View File

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