fix: removed opt.initial becouse opt.value will always hold either the user defined value or the default
This commit is contained in:
@@ -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};`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user