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

Mobx6 array index assignment does not work in Safari #3514

Closed
gylandon opened this issue Sep 4, 2022 · 1 comment · Fixed by #3516
Closed

Mobx6 array index assignment does not work in Safari #3514

gylandon opened this issue Sep 4, 2022 · 1 comment · Fixed by #3516

Comments

@gylandon
Copy link

gylandon commented Sep 4, 2022

Hey mate,
In Safari 9.3.1, assigning an object to an array by index is not working for me. My code:

constructor() {
    makeAutoObservable(this);
    this.list.forEach((i, idx) => this.updateList(i, idx));
 }

updateList = (item, idx) => {
    const newItem = new Item(this, item); // another store
    this.list[idx] = newItem;
    return newItem;
  }

After updateList, this.list[0] is undefined, but the others are good.

The mobx version is 6.6.1.

I find the similar issue #364 (comment), and it was fixed in the previous version. Perhaps it has been missed in mobx6.

@urugator
Copy link
Collaborator

urugator commented Sep 7, 2022

Released as 6.6.2, did not test, so let us know in case it still doesn't work.

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.

2 participants