From e69575f2735363e884fb73b8a682f2b5de24241e Mon Sep 17 00:00:00 2001 From: Vendicated Date: Tue, 13 May 2025 21:15:03 +0200 Subject: [PATCH] fix canary --- src/webpack/patchWebpack.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index 9b66a5b4..a542cb9b 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -412,9 +412,12 @@ function runFactoryWithWrap(patchedFactory: PatchedModuleFactory, thisArg: unkno exports = module.exports; if (typeof require === "function" && require.c) { - if (_blacklistBadModules(require.c, exports, module.id)) { - return factoryReturn; - } + // module might not have been fully initialised yet + try { + if (_blacklistBadModules(require.c, exports, module.id)) { + return factoryReturn; + } + } catch { } } if (exports == null) {