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 =
|
||||
this._resolver.getModuleSystemDependencies({dev, unbundle}).length;
|
||||
|
||||
entryFilePath = response.dependencies[
|
||||
(response.numPrependedDependencies || 0) +
|
||||
numModuleSystemDependencies
|
||||
].path;
|
||||
|
||||
const dependencyIndex = (response.numPrependedDependencies || 0) + numModuleSystemDependencies;
|
||||
if (dependencyIndex in response.dependencies) {
|
||||
entryFilePath = response.dependencies[dependencyIndex].path;
|
||||
}
|
||||
}
|
||||
|
||||
const toModuleTransport = module =>
|
||||
|
|
|
@ -139,7 +139,7 @@ if (__DEV__) { // HMR
|
|||
}
|
||||
|
||||
function acceptAll(modules, inverseDependencies) {
|
||||
if (modules.length === 0) {
|
||||
if (!modules || modules.length === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue