Also test for parent object in case it does not exist

This commit is contained in:
Johannes Zellner
2017-06-06 19:40:39 +02:00
parent c1ec7a06bf
commit 307334ef81

View File

@@ -45,8 +45,7 @@ angular.module('Application').controller('MainController', ['$scope', '$route',
form.$setPristine();
form.$setUntouched();
if ($scope.currentSubscription.plan && $scope.currentSubscription.plan.id === 'free') {
if ($scope.currentSubscription && $scope.currentSubscription.plan && $scope.currentSubscription.plan.id === 'free') {
if ($scope.config.update.box.version === '1.0.0') {
$('#version1Modal').modal('show');
} else {