diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index 73fbeacb6..f3f62a30e 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -110,7 +110,7 @@ Object.defineProperty(Function.prototype, "m", { // When using react devtools or other extensions, we may also catch their webpack here. // This ensures we actually got the right one const { stack } = new Error(); - if (stack?.includes("discord.com") || stack?.includes("discordapp.com")) { + if ((stack?.includes("discord.com") || stack?.includes("discordapp.com")) && !Array.isArray(v)) { logger.info("Found Webpack module factory", stack.match(/\/assets\/(.+?\.js)/)?.[1] ?? ""); patchFactories(v); }