Merge branch 'immediate-finds' into immediate-finds-modules-proxy
This commit is contained in:
commit
d8e3381fb3
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue