Commit 5e0b836b91c2212cdfe1e3923783d5ac33d8ed38
1 parent
4a0ebe7b
Fixed issue with enable/disable button display
Showing
1 changed file
with
3 additions
and
1 deletions
... | ... | @@ -36,7 +36,9 @@ export default function UserDirective($compile, $templateCache, userService) { |
36 | 36 | }; |
37 | 37 | |
38 | 38 | scope.isUserCredentialsEnabled = function() { |
39 | - if (!scope.user || !scope.user.additionalInfo) { | |
39 | + if (scope.user == null || angular.isUndefined(scope.user) || | |
40 | + scope.user.additionalInfo == null || angular.isUndefined(scope.user.additionalInfo) || | |
41 | + scope.user.additionalInfo.userCredentialsEnabled == null || angular.isUndefined(scope.user.additionalInfo.userCredentialsEnabled)) { | |
40 | 42 | return true; |
41 | 43 | } |
42 | 44 | return scope.user.additionalInfo.userCredentialsEnabled === true; | ... | ... |