From 89035812d26a7efd4af6b4ca414cd4614388f7cf Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 23 Jan 2013 15:58:04 +0100 Subject: [PATCH] test if user existists in registration --- app/js/controllers.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/js/controllers.js b/app/js/controllers.js index 642a54d..303d7ef 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -166,6 +166,11 @@ function ListCtrl($scope, $log, Registration, RegistrationTypes, $filter) { } }; angular.forEach( $scope.all_registrations, function(value, key) { + if ( ! value.user ) { + $log.error("all_registrations user corrupted for registration", key, value); + return; + } + var type = value.user.registration_type; inc_count( type ); inc_count( '' ); // total -- 2.20.1