This commit is contained in:
Nuckyz 2024-06-23 19:48:15 -03:00
parent 20efa661b0
commit bdb9c75c74
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -85,7 +85,7 @@ export function proxyInner<T = AnyObject>(
// 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<T = AnyObject>(
// 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);
}
}