fix(lib/modules/finders/filters): use runFilter for nested withDependencies filters
This commit is contained in:
parent
300d506125
commit
8e2abb9e6f
1 changed files with 2 additions and 8 deletions
|
|
@ -3,6 +3,7 @@ import {
|
|||
getInitializedModuleExports,
|
||||
getModuleDependencies,
|
||||
} from '../../metro/utils'
|
||||
import { runFilter } from '../_internal'
|
||||
import { FilterFlag, FilterScopes } from './constants'
|
||||
import { createFilterGenerator } from './utils'
|
||||
import type { Metro } from '../../types'
|
||||
|
|
@ -210,16 +211,9 @@ function depCompare(
|
|||
switch (typeof compare) {
|
||||
case 'function': {
|
||||
const filter = compare
|
||||
const depExports = getInitializedModuleExports(id)
|
||||
if (
|
||||
filter.flags & FilterFlag.RequiresExports &&
|
||||
depExports == null
|
||||
)
|
||||
if (!runFilter(filter, id, getInitializedModuleExports(id)))
|
||||
return false
|
||||
|
||||
const match = filter(id, depExports)
|
||||
if (!match) return false
|
||||
|
||||
continue
|
||||
}
|
||||
case 'object': {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue