mirror of https://github.com/status-im/metro.git
Do not bundle deleted modules in HMR
Reviewed By: mjesun Differential Revision: D5777831 fbshipit-source-id: dd3551194eca99097cea5a1944555cd8adff9f19
This commit is contained in:
parent
14428a67e5
commit
177c4fb1ab
|
@ -96,7 +96,11 @@ class HmrServer<TClient: Client> {
|
||||||
const modules = [];
|
const modules = [];
|
||||||
|
|
||||||
for (const id in result.delta) {
|
for (const id in result.delta) {
|
||||||
modules.push({id, code: result.delta[id]});
|
// The Delta Bundle can have null objects: these correspond to deleted
|
||||||
|
// modules, which we don't need to send to the client.
|
||||||
|
if (result.delta[id] != null) {
|
||||||
|
modules.push({id, code: result.delta[id]});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue