Skip to content

Commit

Permalink
using error.name to find the correct error message for invalid passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Deschamps Rudge authored and Luis Deschamps Rudge committed Mar 6, 2017
1 parent 07d1396 commit 8ebc70f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/connection/database/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function signUpError(id, error) {
};

const errorKey = (error.code === "invalid_password"
&& invalidPasswordKeys[error.description])
&& invalidPasswordKeys[error.name])
|| error.code;

const errorMessage = i18n.str(m, ["error", "signUp", errorKey])
Expand Down

0 comments on commit 8ebc70f

Please sign in to comment.