chore(lib/modules/finders/wait): use existing parameter for exports in waitForModuleByImportedPath
This commit is contained in:
parent
c2d12321f6
commit
d8b2d0302d
1 changed files with 2 additions and 4 deletions
|
|
@ -6,7 +6,6 @@ import {
|
|||
onModuleFinishedImporting,
|
||||
onModuleInitialized,
|
||||
} from '../metro/subscriptions'
|
||||
import { getInitializedModuleExports } from '../metro/utils'
|
||||
import {
|
||||
exportsFromFilterResultFlag,
|
||||
FilterResultFlagToHumanReadable,
|
||||
|
|
@ -208,9 +207,8 @@ export function waitForModuleByImportedPath<T = any>(
|
|||
if (path === cmpPath) {
|
||||
unsub()
|
||||
// Module is not fully initialized yet, so we need to wait for it
|
||||
onModuleInitialized(id, () => {
|
||||
if (!options?.all || mInitialized.has(id))
|
||||
callback(getInitializedModuleExports(id), id)
|
||||
onModuleInitialized(id, (id, exports) => {
|
||||
if (!options?.all || mInitialized.has(id)) callback(exports, id)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue