From 6398dd25d20e6bc3e02425b709233066baf64e0c Mon Sep 17 00:00:00 2001 From: Vendicated Date: Tue, 27 Sep 2022 14:34:57 +0200 Subject: Unbrick Vencord - Pt 1 --- src/utils/patchWebpack.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/utils') diff --git a/src/utils/patchWebpack.ts b/src/utils/patchWebpack.ts index 488e430..ce29c82 100644 --- a/src/utils/patchWebpack.ts +++ b/src/utils/patchWebpack.ts @@ -65,9 +65,11 @@ function patchPush() { if (filter(exports)) { subscriptions.delete(filter); callback(exports); - } else if (exports.default && filter(exports.default)) { - subscriptions.delete(filter); - callback(exports.default); + } else for (const nested in exports) { + if (exports[nested] && filter(exports[nested])) { + subscriptions.delete(filter); + callback(exports[nested]); + } } } catch (err) { logger.error("Error while firing callback for webpack chunk", err); -- cgit