File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -158,8 +158,8 @@ const Self = class ColorElement extends NudeElement {
158158 return Self . Color . get ( color ) ;
159159 }
160160
161- if ( ! CSS . supports ( "color" , value ) ) {
162- // Not supported or invalid value
161+ if ( ! CSS . supports ( "color" , value ) || ! element ) {
162+ // Not supported/invalid value, or no element to resolve the color value from
163163 return null ;
164164 }
165165
@@ -168,7 +168,7 @@ const Self = class ColorElement extends NudeElement {
168168 let color = getComputedStyle ( element ) . backgroundColor ;
169169 element . style . backgroundColor = "" ;
170170
171- let resolvedColor = Self . resolveColor ( color , element ) ;
171+ let resolvedColor = Self . resolveColor ( color ) ;
172172 if ( resolvedColor ) {
173173 Self . #resolvedColors. set ( value , color ) ;
174174 }
You can’t perform that action at this time.
0 commit comments