From bdb9c75c74c93d98a533327f489a9965733a67f8 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 23 Jun 2024 19:48:15 -0300 Subject: [PATCH] e --- src/utils/proxyInner.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/proxyInner.ts b/src/utils/proxyInner.ts index bd1dd96da..0c02febeb 100644 --- a/src/utils/proxyInner.ts +++ b/src/utils/proxyInner.ts @@ -85,7 +85,7 @@ export function proxyInner( // because the top setInnerValue was called before we proxied the get access // example here will also be a proxy: // `const { example } = findByProps("example");` - if (isSameTick && proxyDummy[SYM_PROXY_INNER_VALUE] == null && !isChild) { + if (isSameTick && !isChild && proxyDummy[SYM_PROXY_INNER_VALUE] == null) { const [recursiveProxy, recursiveSetInnerValue] = proxyInner(errMsg, primitiveErrMsg, true); recursiveSetInnerValues.push((innerValue: T) => { @@ -116,7 +116,7 @@ export function proxyInner( // Avoid binding toString if the inner value is null. // This can happen if we are setting the inner value as another instance of proxyInner, which will cause that proxy to instantly evaluate and throw an error - if (typeof innerValue === "function" && innerValue[SYM_PROXY_INNER_GET] == null) { + if (typeof innerValue === "function" && innerValue[SYM_PROXY_INNER_VALUE] == null) { proxy.toString = innerValue.toString.bind(innerValue); } }