Skip to content

Commit 70ce6ef

Browse files
Added null check for violations without a component
1 parent bb3278e commit 70ce6ef

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/views/portfolio/projects/ProjectPolicyViolations.vue

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,13 @@ export default {
7676
field: "component.name",
7777
sortable: true,
7878
formatter(value, row, index) {
79-
let url = xssFilters.uriInUnQuotedAttr("../components/" + row.component.uuid);
80-
let name = common.concatenateComponentName(null, row.component.name, row.component.version);
81-
return `<a href="${url}">${xssFilters.inHTMLData(name)}</a>`;
79+
if (row.component) {
80+
let url = xssFilters.uriInUnQuotedAttr("../components/" + row.component.uuid);
81+
let name = common.concatenateComponentName(null, row.component.name, row.component.version);
82+
return `<a href="${url}">${xssFilters.inHTMLData(name)}</a>`;
83+
} else {
84+
return "";
85+
}
8286
}
8387
},
8488
{

0 commit comments

Comments
 (0)