Skip to content

Value referenced before definition #6

@AFatNiBBa

Description

@AFatNiBBa

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]
))()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions