Merge branch 'immediate-finds' into immediate-finds-modules-proxy

This commit is contained in:
Nuckyz 2024-06-23 19:48:34 -03:00
commit d8e3381fb3
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -82,7 +82,7 @@ export function proxyInner<T = AnyObject>(
// because the top setInnerValue was called before we proxied the get access // because the top setInnerValue was called before we proxied the get access
// example here will also be a proxy: // example here will also be a proxy:
// `const { example } = findByProps("example");` // `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); const [recursiveProxy, recursiveSetInnerValue] = proxyInner(errMsg, primitiveErrMsg, true);
recursiveSetInnerValues.push((innerValue: T) => { recursiveSetInnerValues.push((innerValue: T) => {
@ -113,7 +113,7 @@ export function proxyInner<T = AnyObject>(
// Avoid binding toString if the inner value is null. // 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 // 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); proxy.toString = innerValue.toString.bind(innerValue);
} }
} }