diff options
author | skjnldsv <fremulon@protonmail.com> | 2016-04-07 09:37:27 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-10 21:20:22 +0200 |
commit | 8ae33decfe7e0709bab8902b7605fe5ab1a0cd42 (patch) | |
tree | 3f22e6a8d7da2164b7a22ec4a85fcaf61c7ba650 /js | |
parent | 6498f49ab9cc3cf8130fb8c29ca5fbb3514ae8b1 (diff) |
Improved code
Diffstat (limited to 'js')
-rw-r--r-- | js/components/contactList/contactList_controller.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/js/components/contactList/contactList_controller.js b/js/components/contactList/contactList_controller.js index 88c5085f..4ecd1713 100644 --- a/js/components/contactList/contactList_controller.js +++ b/js/components/contactList/contactList_controller.js @@ -152,11 +152,7 @@ angular.module('contactsApp') // Watch if we have an invalid contact $scope.$watch('ctrl.contactList[0].fullName()', function(fullName) { - if(fullName === '') { - ctrl.invalid = true; - } else { - ctrl.invalid = false; - } + ctrl.invalid = fullName === ''; }); ctrl.createContact = function() { |