File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -128,8 +128,8 @@ const generateCSSVarTokens = () => {
128128 const lightStyle = window . getComputedStyle ( lightElement ) . getPropertyValue ( varName )
129129 const darkStyle = window . getComputedStyle ( darkElement ) . getPropertyValue ( varName )
130130
131- str += varName . replace ( '--' , '--nc-light-' ) + '=' + lightStyle . trim ( ) + ';'
132- str += varName . replace ( '--' , '--nc-dark-' ) + '=' + darkStyle . trim ( ) + ';'
131+ if ( lightStyle ) str += varName . replace ( '--' , '--nc-light-' ) + '=' + lightStyle . trim ( ) + ';'
132+ if ( darkStyle ) str += varName . replace ( '--' , '--nc-dark-' ) + '=' + darkStyle . trim ( ) + ';'
133133
134134 // Workaround for now as we need primary-invert-if-dark which is not available on server yet
135135 if ( varName === '--primary-invert-if-bright' ) {
You can’t perform that action at this time.
0 commit comments