From 7dfbd7031b7ca284c8551f65dcd8b0a2ba0a5594 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 14 Feb 2013 16:54:59 +0100 Subject: [PATCH] don't die on undefined registration or user --- app/js/controllers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/js/controllers.js b/app/js/controllers.js index 3c43f53..4ddca47 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -160,6 +160,7 @@ function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $ $scope.show_submission_type = function() { // FIXME check if all submission are allowed by date and allow them! + if ( angular.isUndefined( $scope.user ) || angular.isUndefined( $scope.registration ) ) return false; return ( angular.isUndefined( $scope.user.registration_type ) // new registration || angular.isUndefined( $scope.registration.state ) // not saved yet -- 2.20.1