Further NPE fix in tag signing display

Fixes https://jira.prod.coreos.systems/browse/QS-37
This commit is contained in:
Joseph Schorr 2017-10-17 13:13:19 -04:00
parent dcec90649e
commit 8081b8424f

View file

@ -94,7 +94,7 @@ export class TagSigningDisplayComponent {
// Find all delegations containing the tag as a target. // Find all delegations containing the tag as a target.
Object.keys(delegationSet.delegations).forEach((delegationName) => { Object.keys(delegationSet.delegations).forEach((delegationName) => {
var delegation = delegationSet.delegations[delegationName]; var delegation = delegationSet.delegations[delegationName];
if (delegation.targets && delegation.targets[tag.name]) { if (delegation && delegation.targets && delegation.targets[tag.name]) {
var DelegationInfo = this.buildDelegationInfo(tag, delegationName, delegation); var DelegationInfo = this.buildDelegationInfo(tag, delegationName, delegation);
info.delegations.push(DelegationInfo); info.delegations.push(DelegationInfo);
info.delegationsByName[delegationName] = DelegationInfo; info.delegationsByName[delegationName] = DelegationInfo;