Commit f5efb8b8 authored by Kev's avatar Kev Committed by Jose Ivan Vargas

Fix console null errors in security dashboard

parent 9b32247c
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
...this.filters, ...this.filters,
}; };
}, },
update: ({ project }) => project.vulnerabilities.nodes, update: ({ project }) => project?.vulnerabilities.nodes || [],
result({ data }) { result({ data }) {
this.pageInfo = preparePageInfo(data?.project?.vulnerabilities?.pageInfo); this.pageInfo = preparePageInfo(data?.project?.vulnerabilities?.pageInfo);
}, },
...@@ -66,8 +66,8 @@ export default { ...@@ -66,8 +66,8 @@ export default {
error() { error() {
this.securityScanners = {}; this.securityScanners = {};
}, },
update({ project: { securityScanners = {} } = {} }) { update({ project = {} }) {
const { available = [], enabled = [], pipelineRun = [] } = securityScanners; const { available = [], enabled = [], pipelineRun = [] } = project?.securityScanners || {};
const translateScannerName = scannerName => this.$options.i18n[scannerName] || scannerName; const translateScannerName = scannerName => this.$options.i18n[scannerName] || scannerName;
return { return {
......
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
...this.filters, ...this.filters,
}; };
}, },
update: ({ project }) => project.vulnerabilitySeveritiesCount, update: ({ project }) => project?.vulnerabilitySeveritiesCount || {},
result() { result() {
this.queryError = false; 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