Skip to content

TypeError on adding a comment to a room of type, channel #73

@obinnaogbonnajoseph

Description

@obinnaogbonnajoseph

I get this error whenever I try to send a comment on a room of type, channel:

TypeError: Cannot add property 0, object is not extensible
at Array.push ()
at e. (qiscus-sdk-core.min.js:14)
at l (qiscus-sdk-core.min.js:12)
at Generator._invoke (qiscus-sdk-core.min.js:12)
at Generator.next (qiscus-sdk-core.min.js:12)
at n (qiscus-sdk-core.min.js:1)
at a (qiscus-sdk-core.min.js:1)
at ZoneDelegate.invoke (zone-evergreen.js:364)
at Zone.run (zone-evergreen.js:123)
at zone-evergreen.js:857

On tracing the error, I observed it comes from this line:

if (self.selected) self.selected.comments.push(messageData)

A suggestion to avoid this type error would be this: self.selected.comments = [...self.selected.comments, messageData];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions