chore: Fix the exception while destructuring data in chatwoot:error listener (#4702)

This commit is contained in:
Devin Ellis
2022-05-26 23:53:29 -07:00
committed by GitHub
parent 52fad886b8
commit 50d2dbd462

View File

@@ -61,9 +61,7 @@ export const actions = {
dispatch('conversationAttributes/getAttributes', {}, { root: true });
}
} catch (error) {
const {
response: { data },
} = error;
const data = error && error.response && error.response.data ? error.response.data : error
IFrameHelper.sendMessage({
event: 'error',
errorType: SET_USER_ERROR,