Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge Case: Mistake on isolating Map entries #27

Closed
lxsmnsyc opened this issue Oct 17, 2023 · 0 comments · Fixed by #26
Closed

Edge Case: Mistake on isolating Map entries #27

lxsmnsyc opened this issue Oct 17, 2023 · 0 comments · Fixed by #26

Comments

@lxsmnsyc
Copy link
Owner

const a = {
  d: {},
  map: new Map,
  b: {
    c: {
      foo: 'bar'
    }
  }
};

a.map.set(a, a.b.c);

a.b.c.parent = a.b;
a.b.c.d = a.d;

This causes a.b.c to be undefined because the origin reference, located at a.map, is deferred due to recursion.

@lxsmnsyc lxsmnsyc mentioned this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant