Skip to content

Commit

Permalink
Update src/numeric-values.js
Browse files Browse the repository at this point in the history
Co-authored-by: Bramus <[email protected]>
  • Loading branch information
johannesodland and bramus authored Feb 2, 2024
1 parent 0533473 commit 34eadcd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/numeric-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,8 @@ function reifyMathExpression(num) {
// Addition and multiplication are N-ary; each node can have any number of arguments.
// If an expression has only a single value in it, and no operation, treat it as an addition node with the single argument.
const root = convertTokensToAST([...num.values]);

// 4. Recursively transform the expression tree into objects
const numericValue = simplifyCalculation(astToCSSNumericValue(root));
if (numericValue instanceof CSSUnitValue) {
return new CSSMathSum(numericValue);
Expand Down

0 comments on commit 34eadcd

Please sign in to comment.