You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/01/30 23:44:53 UTC

[41/50] guacamole-client git commit: GUACAMOLE-197: Revert some unnecessary code changes.

GUACAMOLE-197: Revert some unnecessary code changes.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/4a57012f
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/4a57012f
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/4a57012f

Branch: refs/heads/master
Commit: 4a57012f9da8631c15a64ebc93a35e569e0995db
Parents: b204a4c
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Jan 16 14:27:34 2018 -0500
Committer: Nick Couchman <vn...@apache.org>
Committed: Mon Jan 29 17:08:12 2018 -0500

----------------------------------------------------------------------
 guacamole/src/main/webapp/app/login/directives/login.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/4a57012f/guacamole/src/main/webapp/app/login/directives/login.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/login/directives/login.js b/guacamole/src/main/webapp/app/login/directives/login.js
index f918a55..02aa1ac 100644
--- a/guacamole/src/main/webapp/app/login/directives/login.js
+++ b/guacamole/src/main/webapp/app/login/directives/login.js
@@ -172,11 +172,11 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
                     angular.forEach($scope.remainingFields, function clearEnteredValueIfPassword(field) {
 
                         // Remove entered value only if field is a password field
-                        if (field.type === Field.Type.PASSWORD)
+                        if (field.type === Field.Type.PASSWORD && field.name in $scope.enteredValues)
                             $scope.enteredValues[field.name] = '';
 
                         // If field is not username field and not password field, delete it.
-                        else if (field.type !== Field.Type.USERNAME)
+                        else if (field.type !== Field.Type.USERNAME && field.name in $scope.enteredValues)
                             delete $scope.enteredValues[field.name];
 
                     });