From 908bb75fdc75b88cb1dfa589a1428dc6d307c7a4 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Tue, 12 Jun 2018 17:31:52 +0200 Subject: [PATCH] Only update the appstore profile if the root controller is still present --- src/views/appstore.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/appstore.js b/src/views/appstore.js index 509d3a790..90dc613c8 100644 --- a/src/views/appstore.js +++ b/src/views/appstore.js @@ -507,9 +507,11 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca $scope.appstoreLogin.busy = false; // also update the root controller status - $scope.$parent.fetchAppstoreProfileAndSubscription(function (error) { - if (error) console.error(error); - }); + if ($scope.$parent) { + $scope.$parent.fetchAppstoreProfileAndSubscription(function (error) { + if (error) console.error(error); + }); + } callback(); });