[FIX] Cannot read property 'error' of undefined when creating a channel (#3437)

This commit is contained in:
Reinaldo Neto 2021-10-26 10:40:46 -03:00 committed by GitHub
parent 87a99089ce
commit 72d50887a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ const handleFailure = function handleFailure({ err, isTeam }) {
? I18n.t(err.data.errorType, { room_name: err.data.details.channel_name }) ? I18n.t(err.data.errorType, { room_name: err.data.details.channel_name })
: actionError; : actionError;
} else { } 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')); showErrorAlert(msg, isTeam ? I18n.t('Create_Team') : I18n.t('Create_Channel'));
}, 300); }, 300);