Skip to content

Commit 43159bb

Browse files
committed
fix: error in getting css var name
1 parent a2916e9 commit 43159bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,6 @@ export const extractNumbersAndUnits = value => {
420420

421421
// Return only the CSS variable name given a CSS variable
422422
export const getCSSVarName = value => {
423-
const match = value.match( /var\(\s*([^,)\s]+)/ )
423+
const match = value?.match( /var\(\s*([^,)\s]+)/ )
424424
return match ? match[ 1 ] : null
425425
}

0 commit comments

Comments
 (0)