Commit 7d7b7877 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '247086-Fix-null-errors-in-console' into 'master'

Fix console null errors in security dashboard

See merge request gitlab-org/gitlab!44076
parents 90dd0053 f5efb8b8
......@@ -48,7 +48,7 @@ export default {
...this.filters,
};
},
update: ({ project }) => project.vulnerabilities.nodes,
update: ({ project }) => project?.vulnerabilities.nodes || [],
result({ data }) {
this.pageInfo = preparePageInfo(data?.project?.vulnerabilities?.pageInfo);
},
......@@ -66,8 +66,8 @@ export default {
error() {
this.securityScanners = {};
},
update({ project: { securityScanners = {} } = {} }) {
const { available = [], enabled = [], pipelineRun = [] } = securityScanners;
update({ project = {} }) {
const { available = [], enabled = [], pipelineRun = [] } = project?.securityScanners || {};
const translateScannerName = scannerName => this.$options.i18n[scannerName] || scannerName;
return {
......
......@@ -35,7 +35,7 @@ export default {
...this.filters,
};
},
update: ({ project }) => project.vulnerabilitySeveritiesCount,
update: ({ project }) => project?.vulnerabilitySeveritiesCount || {},
result() {
this.queryError = false;
},
......
---
title: Fix console null errors in security dashboard
merge_request: 44076
author: Kev @KevSlashNull
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment