fix(lib/modules/metro): default initializing module ID to null
This commit is contained in:
parent
e510eea36e
commit
7074e256c1
2 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ import { isModuleExportsBad } from './utils'
|
|||
import type { Metro } from '../types'
|
||||
|
||||
/** Initializing ID */
|
||||
export let _initing = -1
|
||||
export let _initing: Metro.ModuleID | null = null
|
||||
/** Known uninitialized IDs */
|
||||
export const _uninits = new Set<Metro.ModuleID>()
|
||||
/** Known initialized IDs (not blacklisted) */
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ const unsubFFI = waitForModules(byProps('fileFinishedImporting'), exports => {
|
|||
const orig = exports.fileFinishedImporting
|
||||
exports.fileFinishedImporting = (path: string) => {
|
||||
orig(path)
|
||||
const id = _initing
|
||||
const id = _initing!
|
||||
_paths.set(path, id)
|
||||
_execPathSubs(id, path)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue