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

indexOf() not working correctly in a changeFn #405

Open
nthsense opened this issue Jan 18, 2025 · 1 comment
Open

indexOf() not working correctly in a changeFn #405

nthsense opened this issue Jan 18, 2025 · 1 comment

Comments

@nthsense
Copy link

doc.list.indexOf("some value") always returns -1, where doc is the first argument of the changeFn passed to handle.change(). I did some digging into proxies.js and I can make no sense of what is going on in the indexOf() implementation there. Workaround for now is to copy the list first... doc.list.slice().indexOf("some value") gives me the correct index.

@acurrieclark
Copy link
Collaborator

This is actually an automerge issue, rather than automerge-repo. There is a PR pending for it

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

No branches or pull requests

2 participants