Skip to content

Commit

Permalink
fix for linter
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann committed Jun 18, 2024
1 parent c72c763 commit c8e5d5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/color-contrast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const runContrastTest = (colorPairs: ContrastRequirement[], tokens: Tokens): con
// build required string
const minimumContrastRatio = `${minimumContrast}:1`
// colorB is fully opaque
if (!tokens[colorA]) throw new Error(`Color token not found ${colorB}`)
if (!tokens[colorB]) throw new Error(`Color token not found ${colorB}`)
if (!tokens.hasOwnProperty(colorA)) throw new Error(`Color token not found ${colorA}`)
if (!tokens.hasOwnProperty(colorB)) throw new Error(`Color token not found ${colorB}`)

if (parseToRgba(tokens[colorB].value)[3] === 1) {
return {
Expand Down

0 comments on commit c8e5d5c

Please sign in to comment.