Only update the appstore profile if the root controller is still present

This commit is contained in:
Johannes Zellner
2018-06-12 17:31:52 +02:00
parent a273827166
commit 908bb75fdc

View File

@@ -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();
});