From 72d50887a4dda14cdcc536299697db83c127cd8b Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Tue, 26 Oct 2021 10:40:46 -0300 Subject: [PATCH] [FIX] Cannot read property 'error' of undefined when creating a channel (#3437) --- app/sagas/createChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/sagas/createChannel.js b/app/sagas/createChannel.js index c12d18a55..8185f673e 100644 --- a/app/sagas/createChannel.js +++ b/app/sagas/createChannel.js @@ -116,7 +116,7 @@ const handleFailure = function handleFailure({ err, isTeam }) { ? I18n.t(err.data.errorType, { room_name: err.data.details.channel_name }) : actionError; } else { - msg = err?.reason || (errorArray.includes(err?.data?.error) ? I18n.t(err.data.error) : err.data.error || actionError); + msg = err?.reason || (errorArray.includes(err?.data?.error) ? I18n.t(err.data.error) : err?.data?.error || actionError); } showErrorAlert(msg, isTeam ? I18n.t('Create_Team') : I18n.t('Create_Channel')); }, 300);