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(
211211 // the `DEFAULT` key from the list of possible values. If there is no
212212 // `DEFAULT` in the list, there is no match so return `null`.
213213 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
215215 }
216216
217217 // The request looked like `theme('animation.spin')` and was turned into a
218218 // lookup for `--animation-spin-*` which had only one entry which means it
219219 // should be returned directly.
220220 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
222222 }
223223
224224 // 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 {
6666 }
6767
6868 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
7070 }
7171
7272 getOptions ( key : string ) {
73- return this . values . get ( key ) ?. options ?? 0
73+ return this . values . get ( key ) ?. options ?? ThemeOptions . NONE
7474 }
7575
7676 entries ( ) {
You can’t perform that action at this time.
0 commit comments