summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/components/graph/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pipelines/components/graph/utils.js')
-rw-r--r--app/assets/javascripts/pipelines/components/graph/utils.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/pipelines/components/graph/utils.js b/app/assets/javascripts/pipelines/components/graph/utils.js
index 373aa6bf9a1..163b3898c28 100644
--- a/app/assets/javascripts/pipelines/components/graph/utils.js
+++ b/app/assets/javascripts/pipelines/components/graph/utils.js
@@ -1,3 +1,4 @@
+import { isEmpty } from 'lodash';
import Visibility from 'visibilityjs';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import { unwrapStagesWithNeedsAndLookup } from '../unwrapping_utils';
@@ -39,15 +40,15 @@ const serializeGqlErr = (gqlError) => {
const serializeLoadErrors = (errors) => {
const { gqlError, graphQLErrors, networkError, message } = errors;
- if (graphQLErrors) {
+ if (!isEmpty(graphQLErrors)) {
return graphQLErrors.map((err) => serializeGqlErr(err)).join('; ');
}
- if (gqlError) {
+ if (!isEmpty(gqlError)) {
return serializeGqlErr(gqlError);
}
- if (networkError) {
+ if (!isEmpty(networkError)) {
return `Network error: ${networkError.message}`;
}