diff --git a/src/components/VencordSettings/VencordTab.tsx b/src/components/VencordSettings/VencordTab.tsx index c9702b435..c0a66fdc7 100644 --- a/src/components/VencordSettings/VencordTab.tsx +++ b/src/components/VencordSettings/VencordTab.tsx @@ -66,11 +66,6 @@ function VencordSettings() { title: "Enable React Developer Tools", note: "Requires a full restart" }, - { - key: "eagerPatches", - title: "Apply Vencord patches before they are needed", - note: "Increases startup timing, but may make app usage more fluid. Note that the difference of having this on or off is minimal." - }, !IS_WEB && (!IS_DISCORD_DESKTOP || !isWindows ? { key: "frameless", title: "Disable the window frame", diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index e00ae0b13..31aaa911c 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -127,10 +127,17 @@ Object.defineProperty(Function.prototype, "O", { configurable: true, set(v: OnChunksLoaded["j"]) { - // @ts-ignore - delete onChunksLoaded.j; - onChunksLoaded.j = v; - originalOnChunksLoaded.j = v; + function setValue(target: any) { + Object.defineProperty(target, "j", { + value: v, + configurable: true, + enumerable: true, + writable: true + }); + } + + setValue(onChunksLoaded); + setValue(originalOnChunksLoaded); } }); } @@ -318,7 +325,7 @@ function patchFactory(id: PropertyKey, factory: ModuleFactory) { // @ts-ignore originalFactory.$$vencordRequired = true; for (const proxiedModules of allProxiedModules) { - proxiedModules[id] = originalFactory; + Reflect.set(proxiedModules, id, originalFactory); } if (wreq == null && IS_DEV) {