From f727d101fccc7032b41b4652367fe5a9fdc6165c 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 be9dfc974..b8f1f32a5 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