mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Fix infinite loop
This commit is contained in:
9
packages/react-fast-refresh/client.js
vendored
9
packages/react-fast-refresh/client.js
vendored
@@ -16,9 +16,18 @@ if (
|
||||
hmrEnabled &&
|
||||
enabled
|
||||
) {
|
||||
let inBefore = false;
|
||||
module.hot.onRequire({
|
||||
before(module) {
|
||||
if (inBefore) {
|
||||
// This is a module required while loading the react refresh runtime
|
||||
// Do not initialize it to avoid an infinite loop
|
||||
return;
|
||||
}
|
||||
|
||||
inBefore = true;
|
||||
init(module);
|
||||
inBefore = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user