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

删除节点后,把节点重新赋值给另一个孩子节点,修改值无效 #12

Closed
fantasticsoul opened this issue Aug 31, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@fantasticsoul
Copy link
Member

fantasticsoul commented Aug 31, 2024

见下面的代码示例,final.c.c2.test依然是2

  const base = { a: 1, b: { test: 2 }, c: { c1: 1 } };
  const draft = createDraft(base);
  const b = draft.b;
  delete draft.b;
  draft.c.c2 = b;
  draft.c.c2.test = 1000;
  const final = finishDraft(draft);
  // <= 3.12.4 (final.c.c2.test) is 2;
  // the right value of (final.c.c2.test) should be 1000;
  console.log(final);
@fantasticsoul fantasticsoul added the bug Something isn't working label Aug 31, 2024
@fantasticsoul
Copy link
Member Author

fixed at 3.13.1+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant