File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export function resolveTheme<T>(
62
62
applyThemeList ?: DeepPartialApplyTheme < T > [ ] ,
63
63
) : T {
64
64
const prefix = getPrefix ( ) ;
65
+ const _custom = custom ?. filter ( ( value ) => value !== undefined ) ;
65
66
const _clearThemeList = clearThemeList ?. filter ( ( value ) => value !== undefined ) ;
66
67
const _applyThemeList = applyThemeList ?. filter ( ( value ) => value !== undefined ) ;
67
68
const baseTheme = _clearThemeList ?. length || prefix ? klona ( base ) : base ;
@@ -88,9 +89,13 @@ export function resolveTheme<T>(
88
89
stringIterator ( baseTheme , ( value ) => applyPrefix ( value , prefix ) ) ;
89
90
}
90
91
91
- const theme = deepMergeStrings ( twMerge ) ( baseTheme , ... custom ) as T ;
92
+ let theme = baseTheme ;
92
93
93
- if ( _applyThemeList ?. length ) {
94
+ if ( _custom . length ) {
95
+ theme = deepMergeStrings ( twMerge ) ( baseTheme , ...custom ) as T ;
96
+ }
97
+
98
+ if ( _applyThemeList ?. length && _custom . length ) {
94
99
const finalApplyTheme = cloneWithValue < T , ApplyTheme > ( baseTheme , "merge" ) ;
95
100
96
101
let run = false ;
You can’t perform that action at this time.
0 commit comments