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
8200041694
commit
41576eaa56
|
@ -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