Skip to content

Commit

Permalink
fix webpack patch on client using discordapp.com part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Vendicated committed May 5, 2024
1 parent 066b872 commit ce18000
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/webpack/patchWebpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ Object.defineProperty(Function.prototype, "m", {
set(v: any) {
// When using react devtools or other extensions, we may also catch their webpack here.
// This ensures we actually got the right one
const error = new Error();
if (error.stack?.includes("discord.com")) {
logger.info("Found Webpack module factory", error.stack.match(/\/assets\/(.+?\.js)/)?.[1] ?? "");
const { stack } = new Error();
if (stack?.includes("discord.com") || stack?.includes("discordapp.com")) {
logger.info("Found Webpack module factory", stack.match(/\/assets\/(.+?\.js)/)?.[1] ?? "");
patchFactories(v);
}

Expand Down

0 comments on commit ce18000

Please sign in to comment.