@@ -172,7 +172,7 @@ export function _descriptors(proxy, defaults = {scriptable: true, indexable: tru
172172}
173173
174174const readKey = ( prefix , name ) => prefix ? prefix + _capitalize ( name ) : name ;
175- const needsSubResolver = ( prop , value ) => isObject ( value ) ;
175+ const needsSubResolver = ( prop , value ) => isObject ( value ) && prop !== 'adapters' ;
176176
177177function _cached ( target , prop , resolve ) {
178178 let value = target [ prop ] ; // cached value
@@ -258,9 +258,9 @@ function addScopes(set, parentScopes, key, parentFallback) {
258258 // The fallback will resume to that new scope.
259259 return fallback ;
260260 }
261- } else if ( scope === false && key !== 'fill' ) {
262- // Fallback to `false` results to `false`, expect for `fill` .
263- // The special case (fill) should be handled through descriptors.
261+ } else if ( scope === false && defined ( parentFallback ) && key !== parentFallback ) {
262+ // Fallback to `false` results to `false`, when falling back to different key .
263+ // For example `interaction` from `hover` or `plugins.tooltip` and `animation` from `animations`
264264 return null ;
265265 }
266266 }
@@ -272,23 +272,25 @@ function createSubResolver(parentScopes, resolver, prop, value) {
272272 const fallback = resolveFallback ( resolver . _fallback , prop , value ) ;
273273 const allScopes = [ ...parentScopes , ...rootScopes ] ;
274274 const set = new Set ( [ value ] ) ;
275- let key = prop ;
276- while ( key !== false ) {
277- key = addScopes ( set , allScopes , key , fallback ) ;
278- if ( key === null ) {
279- return false ;
280- }
275+ let key = addScopesFromKey ( set , allScopes , prop , fallback || prop ) ;
276+ if ( key === null ) {
277+ return false ;
281278 }
282279 if ( defined ( fallback ) && fallback !== prop ) {
283- const fallbackScopes = allScopes ;
284- key = fallback ;
285- while ( key !== false ) {
286- key = addScopes ( set , fallbackScopes , key , fallback ) ;
280+ key = addScopesFromKey ( set , allScopes , fallback , key ) ;
281+ if ( key === null ) {
282+ return false ;
287283 }
288284 }
289285 return _createResolver ( [ ...set ] , [ '' ] , rootScopes , fallback ) ;
290286}
291287
288+ function addScopesFromKey ( set , allScopes , key , fallback ) {
289+ while ( key ) {
290+ key = addScopes ( set , allScopes , key , fallback ) ;
291+ }
292+ return key ;
293+ }
292294
293295function _resolveWithPrefixes ( prop , prefixes , scopes , proxy ) {
294296 let value ;
0 commit comments