From 6e0064c5fc11457a365ea027af91b8c580fb3d8e Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 7 May 2024 02:57:17 -0300 Subject: [PATCH] give a name to the proxy dummy function, for better logs in the console --- src/utils/lazy.ts | 2 +- src/utils/proxyInner.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/lazy.ts b/src/utils/lazy.ts index 4edc56d0d..664d4e114 100644 --- a/src/utils/lazy.ts +++ b/src/utils/lazy.ts @@ -65,7 +65,7 @@ export function proxyLazy(factory: () => T, attempts = 5, isChild = fal let isSameTick = true; if (!isChild) setTimeout(() => isSameTick = false, 0); - const proxyDummy = Object.assign(function () { }, { + const proxyDummy = Object.assign(function ProxyDummy() { }, { [proxyLazyGet]() { if (!proxyDummy[proxyLazyCache]) { if (!get.$$vencordLazyFailed()) { diff --git a/src/utils/proxyInner.ts b/src/utils/proxyInner.ts index 698363c71..24018a1d6 100644 --- a/src/utils/proxyInner.ts +++ b/src/utils/proxyInner.ts @@ -47,7 +47,7 @@ export function proxyInner( let isSameTick = true; if (!isChild) setTimeout(() => isSameTick = false, 0); - const proxyDummy = Object.assign(function () { }, { + const proxyDummy = Object.assign(function ProxyDummy() { }, { [proxyInnerGet]: function () { if (proxyDummy[proxyInnerValue] == null) { throw new Error(errMsg);