give a name to the proxy dummy function, for better logs in the console
This commit is contained in:
parent
b047f9ce28
commit
6e0064c5fc
|
@ -65,7 +65,7 @@ export function proxyLazy<T = any>(factory: () => T, attempts = 5, isChild = fal
|
||||||
let isSameTick = true;
|
let isSameTick = true;
|
||||||
if (!isChild) setTimeout(() => isSameTick = false, 0);
|
if (!isChild) setTimeout(() => isSameTick = false, 0);
|
||||||
|
|
||||||
const proxyDummy = Object.assign(function () { }, {
|
const proxyDummy = Object.assign(function ProxyDummy() { }, {
|
||||||
[proxyLazyGet]() {
|
[proxyLazyGet]() {
|
||||||
if (!proxyDummy[proxyLazyCache]) {
|
if (!proxyDummy[proxyLazyCache]) {
|
||||||
if (!get.$$vencordLazyFailed()) {
|
if (!get.$$vencordLazyFailed()) {
|
||||||
|
|
|
@ -47,7 +47,7 @@ export function proxyInner<T = any>(
|
||||||
let isSameTick = true;
|
let isSameTick = true;
|
||||||
if (!isChild) setTimeout(() => isSameTick = false, 0);
|
if (!isChild) setTimeout(() => isSameTick = false, 0);
|
||||||
|
|
||||||
const proxyDummy = Object.assign(function () { }, {
|
const proxyDummy = Object.assign(function ProxyDummy() { }, {
|
||||||
[proxyInnerGet]: function () {
|
[proxyInnerGet]: function () {
|
||||||
if (proxyDummy[proxyInnerValue] == null) {
|
if (proxyDummy[proxyInnerValue] == null) {
|
||||||
throw new Error(errMsg);
|
throw new Error(errMsg);
|
||||||
|
|
Loading…
Reference in a new issue