projects
/
angular-drzb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
888a605
)
don't die on undefined registration or user
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 14 Feb 2013 15:54:59 +0000
(16:54 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Thu, 14 Feb 2013 15:54:59 +0000
(16:54 +0100)
app/js/controllers.js
patch
|
blob
|
history
diff --git
a/app/js/controllers.js
b/app/js/controllers.js
index
3c43f53
..
4ddca47
100644
(file)
--- 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