Skip to content

Commit

Permalink
Fix U2F error reasons always hidden
Browse files Browse the repository at this point in the history
This strict equality check in `u2fError` was causing the error
description to hide immediately after showing. `Object.keys`
always returns strings, but `errorType` argument is usually a
number type.
  • Loading branch information
stecman committed Jul 2, 2021
1 parent a3476e5 commit b583505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web_src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,7 @@ function u2fError(errorType) {
u2fErrors[errorType].removeClass('hide');

Object.keys(u2fErrors).forEach((type) => {
if (type !== errorType) {
if (type !== `${errorType}`) {
u2fErrors[type].addClass('hide');
}
});
Expand Down

0 comments on commit b583505

Please sign in to comment.