Handle NPE in tag signing display

This commit is contained in:
Joseph Schorr 2017-10-09 14:07:16 -04:00
parent 563f6b5187
commit a7f02c5451

View file

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