From 7b7b87316d71ff3a0e3cea36b6897f9b203e14c6 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 23 May 2024 07:09:03 -0300 Subject: [PATCH] HORROR --- 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 f5ebea7e1..e00ae0b13 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -19,7 +19,7 @@ const initCallbackRegex = canonicalizeMatch(/{return \i\(".+?"\)}/); const allProxiedModules = new Set(); -const modulesProxyhandler: ProxyHandler = { +const modulesProxyHandler: ProxyHandler = { ...Object.fromEntries(Object.getOwnPropertyNames(Reflect).map(propName => [propName, (...args: any[]) => Reflect[propName](...args)] )), @@ -176,7 +176,7 @@ Object.defineProperty(Function.prototype, "m", { // @ts-ignore originalModules.$$proxiedModules = proxiedModules; allProxiedModules.add(proxiedModules); - Object.setPrototypeOf(originalModules, new Proxy(proxiedModules, modulesProxyhandler)); + Object.setPrototypeOf(originalModules, new Proxy(proxiedModules, modulesProxyHandler)); } Object.defineProperty(this, "m", {