From eb5a3b53088d6b8b68776f9278b2cf224bc886aa Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:43:10 -0300 Subject: [PATCH] Webpack, not Discord --- src/webpack/patchWebpack.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index 9ebf24639..5377790bd 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -127,7 +127,7 @@ define(Function.prototype, "m", { // The proxy responsible for patching the module factories when they are set, or definining getters for the patched versions const proxiedModuleFactories = new Proxy(originalModules, moduleFactoriesHandler); /* - If Discord ever decides to set module factories using the variable of the modules object directly, instead of wreq.m, switch the proxy to the prototype + If Webpack ever decides to set module factories using the variable of the modules object directly, instead of wreq.m, switch the proxy to the prototype Reflect.setPrototypeOf(originalModules, new Proxy(originalModules, moduleFactoriesHandler)); */ @@ -137,7 +137,7 @@ define(Function.prototype, "m", { const moduleFactoriesHandler: ProxyHandler = { /* - If Discord ever decides to set module factories using the variable of the modules object directly instead of wreq.m, we need to switch the proxy to the prototype + If Webpack ever decides to set module factories using the variable of the modules object directly instead of wreq.m, we need to switch the proxy to the prototype and that requires defining additional traps for keeping the object working // Proxies on the prototype dont intercept "get" when the property is in the object itself. But in case it isn't we need to return undefined,