diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-07 15:10:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-07 15:10:27 +0300 |
commit | 53f456b167f19877d663ee6ed510673cebee0f91 (patch) | |
tree | fcc0bb52b79c195bf0eda100cc5d7e7a16dc0c0b /app/assets/javascripts/vue_shared/components/user_select | |
parent | e8a31d8dc2afd673ca50d74d26edab0a0fec83ca (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/user_select')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/user_select/user_select.vue | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/assets/javascripts/vue_shared/components/user_select/user_select.vue b/app/assets/javascripts/vue_shared/components/user_select/user_select.vue index c570ea09da3..3116d2fbf32 100644 --- a/app/assets/javascripts/vue_shared/components/user_select/user_select.vue +++ b/app/assets/javascripts/vue_shared/components/user_select/user_select.vue @@ -108,10 +108,12 @@ export default { error({ graphQLErrors }) { // TODO This error suppression is temporary (BE fix required) // https://gitlab.com/gitlab-org/gitlab/-/issues/329750 - if ( - graphQLErrors.length === 1 && - graphQLErrors[0]?.message === 'Cannot return null for non-nullable field GroupMember.user' - ) { + const isNullError = ({ message }) => { + return message === 'Cannot return null for non-nullable field GroupMember.user'; + }; + + if (graphQLErrors?.length > 0 && graphQLErrors.every(isNullError)) { + // only null-related errors exist, suppress them. // eslint-disable-next-line no-console console.error( "Suppressing the error 'Cannot return null for non-nullable field GroupMember.user'. Please see https://gitlab.com/gitlab-org/gitlab/-/issues/329750", |