Skip to content

Commit

Permalink
improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Oct 18, 2023
1 parent 24644de commit 365d650
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/util/dataTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ const AUTO_VAR_INJECTION_EXCEPTIONS = new Set([
// This is not a data type, but rather a function that can normalize the
// correct values.
export function normalize(value, context = null, isRoot = true) {
if (
(context ? !AUTO_VAR_INJECTION_EXCEPTIONS.has(context.property) : true) &&
value.startsWith('--')
) {
let isVarException = context && AUTO_VAR_INJECTION_EXCEPTIONS.has(context.property)
if (value.startsWith('--') && !isVarException) {
return `var(${value})`
}

Expand Down

0 comments on commit 365d650

Please sign in to comment.