File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -211,14 +211,14 @@ function readFromCss(
211
211
// the `DEFAULT` key from the list of possible values. If there is no
212
212
// `DEFAULT` in the list, there is no match so return `null`.
213
213
if ( path [ path . length - 1 ] === 'DEFAULT' ) {
214
- return [ ( obj ?. DEFAULT ?? null ) as any , optionsObj . DEFAULT ?? 0 ] as const
214
+ return [ ( obj ?. DEFAULT ?? null ) as any , optionsObj . DEFAULT ?? ThemeOptions . NONE ] as const
215
215
}
216
216
217
217
// The request looked like `theme('animation.spin')` and was turned into a
218
218
// lookup for `--animation-spin-*` which had only one entry which means it
219
219
// should be returned directly.
220
220
if ( 'DEFAULT' in obj && Object . keys ( obj ) . length === 1 ) {
221
- return [ obj . DEFAULT as any , optionsObj . DEFAULT ?? 0 ] as const
221
+ return [ obj . DEFAULT as any , optionsObj . DEFAULT ?? ThemeOptions . NONE ] as const
222
222
}
223
223
224
224
// Attach the CSS values to the object for later use. This object could be
Original file line number Diff line number Diff line change @@ -66,11 +66,11 @@ export class Theme {
66
66
}
67
67
68
68
hasDefault ( key : string ) : boolean {
69
- return ( ( this . values . get ( key ) ?. options ?? 0 ) & ThemeOptions . DEFAULT ) === ThemeOptions . DEFAULT
69
+ return ( this . getOptions ( key ) & ThemeOptions . DEFAULT ) === ThemeOptions . DEFAULT
70
70
}
71
71
72
72
getOptions ( key : string ) {
73
- return this . values . get ( key ) ?. options ?? 0
73
+ return this . values . get ( key ) ?. options ?? ThemeOptions . NONE
74
74
}
75
75
76
76
entries ( ) {
You can’t perform that action at this time.
0 commit comments