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

Posting a comment crashes the app after a while #13

Open
birkir opened this issue Aug 16, 2018 · 0 comments
Open

Posting a comment crashes the app after a while #13

birkir opened this issue Aug 16, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@birkir
Copy link
Owner

birkir commented Aug 16, 2018

Scenario: You post a comment. A placeholder comment is shown while the app makes a request to the API and waits for it to be resolved back with an ID.

When the real comment comes back from the API and is going to replace the placeholder comment, this happens:

[mobx-state-tree] Cannot modify 'late(function (){return v})[]@/items/17748940/comments', the object is protected and can only be modified by using an action.

I am guessing this isn't wrapped in an action (because of the ref.on()) and could be resolved by creating a separate action on the Item model.

https://github.com/birkir/hekla/blob/master/src/stores/models/Item.ts#L330

@birkir birkir added the bug Something isn't working label Aug 16, 2018
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