Merge pull request #13932 from webpack/bugfix/infinite-loop
fix hmr check returning empty array
This commit is contained in:
commit
a6e9f59dfc
|
@ -13,7 +13,7 @@ if (module.hot) {
|
|||
module.hot
|
||||
.check()
|
||||
.then(function (updatedModules) {
|
||||
if (!updatedModules || updatedModules.length === 0) {
|
||||
if (!updatedModules) {
|
||||
log("warning", "[HMR] Cannot find update. Need to do a full reload!");
|
||||
log(
|
||||
"warning",
|
||||
|
|
|
@ -12,7 +12,7 @@ if (module.hot) {
|
|||
module.hot
|
||||
.check(true)
|
||||
.then(function (updatedModules) {
|
||||
if (!updatedModules || updatedModules.length === 0) {
|
||||
if (!updatedModules) {
|
||||
if (fromUpdate) log("info", "[HMR] Update applied.");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ if (module.hot) {
|
|||
module.hot
|
||||
.check()
|
||||
.then(function (updatedModules) {
|
||||
if (!updatedModules || updatedModules.length === 0) {
|
||||
if (!updatedModules) {
|
||||
if (fromUpdate) log("info", "[HMR] Update applied.");
|
||||
else log("warning", "[HMR] Cannot find update.");
|
||||
return;
|
||||
|
|
|
@ -252,7 +252,11 @@ module.exports = function () {
|
|||
.then($hmrDownloadManifest$)
|
||||
.then(function (update) {
|
||||
if (!update) {
|
||||
return setStatus(applyInvalidatedModules() ? "ready" : "idle");
|
||||
return setStatus(applyInvalidatedModules() ? "ready" : "idle").then(
|
||||
function () {
|
||||
return null;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
return setStatus("prepare").then(function () {
|
||||
|
|
Loading…
Reference in New Issue