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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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