diff --git a/app/javascript/dashboard/store/modules/conversations/index.js b/app/javascript/dashboard/store/modules/conversations/index.js index 94c125494..b3e39d397 100644 --- a/app/javascript/dashboard/store/modules/conversations/index.js +++ b/app/javascript/dashboard/store/modules/conversations/index.js @@ -146,7 +146,10 @@ export const mutations = { [types.ADD_CONVERSATION_ATTACHMENTS](_state, message) { // 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; }