From b67c09a4c124961a4189ac439a4ccaf27a9d4ec9 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Mon, 16 Dec 2019 16:22:29 -0800 Subject: [PATCH] Use refreshApp in onReady --- src/views/app.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/views/app.js b/src/views/app.js index d2430a232..120ce9302 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -989,8 +989,10 @@ angular.module('Application').controller('AppController', ['$scope', '$location' if (error) return callback(error); // ensure we have amended progress properties set before copy - app.taskProgress = $scope.app.taskProgress; - app.taskProgressMessage = $scope.app.taskProgressMessage; + if ($scope.app) { + app.taskProgress = $scope.app.taskProgress; + app.taskProgressMessage = $scope.app.taskProgressMessage; + } $scope.app = app; @@ -1029,12 +1031,9 @@ angular.module('Application').controller('AppController', ['$scope', '$location' } Client.onReady(function () { - Client.getApp(appId, function (error, app) { - if (error && error.statusCode === 404) return $location.path('/apps'); + refreshApp(appId, function (error) { if (error) return Client.error(error); - $scope.app = app; - switchView(); asyncSeries([