From f686cba3988dcbefbc5d9d524bea832dfd46c7bf Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 22 May 2024 05:11:09 -0300 Subject: [PATCH] Fix not setting property on originalOnChunksLoaded --- src/webpack/patchWebpack.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index f891e38d..311e6f2b 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -99,6 +99,16 @@ Object.defineProperty(Function.prototype, "O", { }; onChunksLoaded.toString = originalOnChunksLoaded.toString.bind(originalOnChunksLoaded); + + // Returns whether a chunk has been loaded + Object.defineProperty(onChunksLoaded, "j", { + set(v) { + delete onChunksLoaded.j; + onChunksLoaded.j = v; + originalOnChunksLoaded.j = v; + }, + configurable: true + }); } Object.defineProperty(this, "O", {