If a Proxy is inside of its target, is used a special kind of circular reference in which the value will be defined, there could be a reference to that value before it has been defined
(In this case x[2])
const a = {};
a.b = a.c = new Proxy(a, {});
console.log(eval(uneval(a)).b) // undefinded
Generated Source:
((x = {}) => (
x[1] = {
b: x[2]
},
x[1].c = x[2] = new Proxy(
x[1],
{}
),
x[1]
))()
If a
Proxyis inside of its target, is used a special kind of circular reference in which the value will be defined, there could be a reference to that value before it has been defined(In this case
x[2])Generated Source: