Remove obsolete nested webpack search

This commit is contained in:
V 2023-11-23 03:21:58 +01:00
parent 63451bad25
commit 9efc0ff579
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
2 changed files with 3 additions and 80 deletions

View file

@ -170,18 +170,9 @@ function patchFactories(factories: Record<string | number, (module: { exports: a
if (filter(exports)) {
subscriptions.delete(filter);
callback(exports, numberId);
} else if (typeof exports === "object") {
if (exports.default && filter(exports.default)) {
subscriptions.delete(filter);
callback(exports.default, numberId);
}
for (const nested in exports) if (nested.length <= 3) {
if (exports[nested] && filter(exports[nested])) {
subscriptions.delete(filter);
callback(exports[nested], numberId);
}
}
} else if (exports.default && filter(exports.default)) {
subscriptions.delete(filter);
callback(exports.default, numberId);
}
} catch (err) {
logger.error("Error while firing callback for webpack chunk", err);