mirror of https://github.com/status-im/metro.git
Fixes hotcode reloading issue
Reviewed By: martinbigio Differential Revision: D3136032 fb-gh-sync-id: 5666fd45ffa574d2156b03c7bfbda3fe97090f56 fbshipit-source-id: 5666fd45ffa574d2156b03c7bfbda3fe97090f56
This commit is contained in:
parent
65b0f7c868
commit
f9a9cd6f25
|
@ -390,10 +390,11 @@ class Bundler {
|
||||||
const numModuleSystemDependencies =
|
const numModuleSystemDependencies =
|
||||||
this._resolver.getModuleSystemDependencies({dev, unbundle}).length;
|
this._resolver.getModuleSystemDependencies({dev, unbundle}).length;
|
||||||
|
|
||||||
entryFilePath = response.dependencies[
|
|
||||||
(response.numPrependedDependencies || 0) +
|
const dependencyIndex = (response.numPrependedDependencies || 0) + numModuleSystemDependencies;
|
||||||
numModuleSystemDependencies
|
if (dependencyIndex in response.dependencies) {
|
||||||
].path;
|
entryFilePath = response.dependencies[dependencyIndex].path;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const toModuleTransport = module =>
|
const toModuleTransport = module =>
|
||||||
|
|
|
@ -139,7 +139,7 @@ if (__DEV__) { // HMR
|
||||||
}
|
}
|
||||||
|
|
||||||
function acceptAll(modules, inverseDependencies) {
|
function acceptAll(modules, inverseDependencies) {
|
||||||
if (modules.length === 0) {
|
if (!modules || modules.length === 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue