From 870d5ed0c5894d00591587808d1ebbf50e27fce1 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Mon, 10 Nov 2014 11:37:52 -0500 Subject: [PATCH] Fix NPE --- static/js/app.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 623797f9d..7c00c5831 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -2585,7 +2585,7 @@ quayApp.directive('focusablePopoverContent', ['$timeout', '$popover', function ( $body = $('body'); var hide = function() { $body.off('click'); - + if (!scope) { return; } scope.$apply(function() { if (!scope) { return; } @@ -4841,11 +4841,14 @@ quayApp.directive('stepView', function ($compile) { this.next = function() { if (this.currentStepIndex >= 0) { - if (!this.getCurrentStep().scope.completeCondition) { + var currentStep = this.getCurrentStep(); + if (!currentStep || !currentStep.scope) { return; } + + if (!currentStep.scope.completeCondition) { return; } - this.getCurrentStep().element.hide(); + currentStep.element.hide(); if (this.unwatch) { this.unwatch();