GUACAMOLE-197: Revert some unnecessary code changes.

This commit is contained in:
Nick Couchman
2018-01-16 14:27:34 -05:00
parent b204a4c708
commit 4a57012f9d

View File

@@ -172,11 +172,11 @@ angular.module('login').directive('guacLogin', [function guacLogin() {
angular.forEach($scope.remainingFields, function clearEnteredValueIfPassword(field) { angular.forEach($scope.remainingFields, function clearEnteredValueIfPassword(field) {
// Remove entered value only if field is a password 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] = ''; $scope.enteredValues[field.name] = '';
// If field is not username field and not password field, delete it. // 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]; delete $scope.enteredValues[field.name];
}); });