projects
/
angular-drzb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c6c25b
)
BUGFIX: abstract shouldn't die for registrations without work
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 21 Jan 2013 21:19:31 +0000
(22:19 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 21 Jan 2013 21:19:31 +0000
(22:19 +0100)
app/js/controllers.js
patch
|
blob
|
history
diff --git
a/app/js/controllers.js
b/app/js/controllers.js
index
2440bae
..
642a54d
100644
(file)
--- a/
app/js/controllers.js
+++ b/
app/js/controllers.js
@@
-134,10
+134,12
@@
function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $
}
$scope.abstract_class = function(work) {
+ if ( work === undefined ) return;
var abstract = work.abstract;
return angular.isString(abstract) && abstract.length <= 2000 ? 'ok' : 'ng-invalid';
}
$scope.abstract_length = function(work) {
+ if ( work === undefined ) return;
var abstract = work.abstract;
if ( ! abstract ) return 0;
return abstract.length <= 2000 ? abstract.length : 2000 - abstract.length;