diff --git a/src/utils/lazy.ts b/src/utils/lazy.ts index fee6e8133..d1bb3e0ae 100644 --- a/src/utils/lazy.ts +++ b/src/utils/lazy.ts @@ -83,9 +83,7 @@ export function proxyLazy(factory: () => T, attempts = 5, isChild let isSameTick = true; if (!isChild) setTimeout(() => isSameTick = false, 0); - // Define the function in an object to preserve the name after minification - const proxyDummy = ({ ProxyDummy() { } }).ProxyDummy; - Object.assign(proxyDummy, { + const proxyDummy = Object.assign(function () { }, { [SYM_LAZY_GET]() { if (!proxyDummy[SYM_LAZY_CACHED]) { if (!get.$$vencordLazyFailed()) { diff --git a/src/utils/proxyInner.ts b/src/utils/proxyInner.ts index 2f701fe64..bd1dd96da 100644 --- a/src/utils/proxyInner.ts +++ b/src/utils/proxyInner.ts @@ -60,9 +60,7 @@ export function proxyInner( let isSameTick = true; if (!isChild) setTimeout(() => isSameTick = false, 0); - // Define the function in an object to preserve the name after minification - const proxyDummy = ({ ProxyDummy() { } }).ProxyDummy; - Object.assign(proxyDummy, { + const proxyDummy = Object.assign(function () { }, { [SYM_PROXY_INNER_GET]: function () { if (proxyDummy[SYM_PROXY_INNER_VALUE] == null) { throw new Error(errMsg);