Skip to content

Commit 35537ea

Browse files
committed
move ??
1 parent 30d8073 commit 35537ea

File tree

1 file changed

+2
-2
lines changed
  • packages/tailwindcss-language-service/src/util

1 file changed

+2
-2
lines changed

packages/tailwindcss-language-service/src/util/color.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export function getColorFromValue(value: unknown): culori.Color | KeywordColor |
276276
return null
277277
}
278278

279-
return tryParseColor(trimmedValue) ?? null
279+
return tryParseColor(trimmedValue)
280280
}
281281

282282
let toRgb = culori.converter('rgb')
@@ -298,7 +298,7 @@ const COLOR_MIX_REGEX = /color-mix\(in [^,]+,\s*(.*?)\s*(\d+|\.\d+|\d+\.\d+)%,\s
298298

299299
function tryParseColor(color: string) {
300300
try {
301-
return culori.parse(color)
301+
return culori.parse(color) ?? null
302302
} catch (err) {
303303
console.error('Error parsing color', color)
304304
console.error(err)

0 commit comments

Comments
 (0)