Merge pull request #2882 from coreos-inc/joseph.schorr/QS-29/typeerror-fixes

Small frontend fixes
This commit is contained in:
josephschorr 2017-10-09 15:06:06 -04:00 committed by GitHub
commit 459d0ccd44
3 changed files with 3 additions and 3 deletions

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;

View file

@ -60,7 +60,7 @@
};
$scope.hasPrompt = function(user, prompt_name) {
if (!user.prompts) {
if (!user || !user.prompts) {
return false;
}

View file

@ -1,4 +1,4 @@
<div class="cor-loader-inline" ng-if="user.anonymous || state == 'updating'"></div>
<div class="cor-loader-inline" ng-if="!user || user.anonymous || state == 'updating'"></div>
<!-- Confirm username -->
<div class="update-user" ng-show="hasPrompt(user, 'confirm_username') && state != 'updating'">