fix(lib/modules/finders/lookup): skip inversing boolean in initialized check
This commit is contained in:
parent
fead7436a9
commit
856b28d7ba
1 changed files with 8 additions and 4 deletions
|
|
@ -123,10 +123,12 @@ export function* lookupModules(filter: Filter, options?: LookupModulesOptions) {
|
|||
const id = Number(sId)
|
||||
let exports: Metro.ModuleExports | undefined
|
||||
|
||||
if (!isModuleInitialized(id)) {
|
||||
if (isModuleInitialized(id))
|
||||
exports = getInitializedModuleExports(id)
|
||||
else {
|
||||
if (noInitCached) continue
|
||||
exports = __r(id)
|
||||
} else exports = getInitializedModuleExports(id)
|
||||
}
|
||||
|
||||
yield [exportsFromFilterResultFlag(flag, exports, options), id]
|
||||
}
|
||||
|
|
@ -203,10 +205,12 @@ export function lookupModule(filter: Filter, options?: LookupModulesOptions) {
|
|||
const id = Number(sId)
|
||||
let exports: Metro.ModuleExports
|
||||
|
||||
if (!isModuleInitialized(id)) {
|
||||
if (isModuleInitialized(id))
|
||||
exports = getInitializedModuleExports(id)
|
||||
else {
|
||||
if (noInitCached) continue
|
||||
exports = __r(id)
|
||||
} else exports = getInitializedModuleExports(id)
|
||||
}
|
||||
|
||||
return [exportsFromFilterResultFlag(flag, exports, options), id]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue