Skip to content

Posting a comment crashes the app after a while #13

@birkir

Description

@birkir

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions