From b192c891460eab3b2c7150245ae67e45dffcaf0e Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 24 May 2024 03:09:25 -0300 Subject: [PATCH] I can never not forget something --- 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 0f552f17c..9d4a3b777 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -19,8 +19,8 @@ const initCallbackRegex = canonicalizeMatch(/{return \i\(".+?"\)}/); /** A set with all the module factories objects */ const allModuleFactories = new Set(); -function defineModuleFactoryGetter(modules: WebpackRequire["m"], id: PropertyKey, factory: ModuleFactory) { - Object.defineProperty(modules, id, { +function defineModuleFactoryGetter(modulesFactories: WebpackRequire["m"], id: PropertyKey, factory: ModuleFactory) { + Object.defineProperty(modulesFactories, id, { get: () => { // $$vencordOriginal means the factory is already patched // @ts-ignore