fix: Handle the case where message has no attachments (#9902)
Fix the broken message sending due to the errors in attachment update PR https://github.com/chatwoot/chatwoot/pull/9784 Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
@@ -146,7 +146,10 @@ export const mutations = {
|
|||||||
|
|
||||||
[types.ADD_CONVERSATION_ATTACHMENTS](_state, message) {
|
[types.ADD_CONVERSATION_ATTACHMENTS](_state, message) {
|
||||||
// early return if the message has not been sent, or has no attachments
|
// early return if the message has not been sent, or has no attachments
|
||||||
if (message.status !== MESSAGE_STATUS.SENT || !message.attachments.length) {
|
if (
|
||||||
|
message.status !== MESSAGE_STATUS.SENT ||
|
||||||
|
!message.attachments?.length
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user