diff options
author | Stephen Holdaway <stecman@gmail.com> | 2021-07-03 20:19:38 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 09:19:38 +0100 |
commit | f166f9b2e10ad3ae39e6d58768c0c93b4515bb2d (patch) | |
tree | 64728cd026199b7b229e06edad6ac7bcb378f645 /web_src/js/index.js | |
parent | a9ba29b1cd85978bdb83af047080e921fd6e00fa (diff) | |
download | gitea-f166f9b2e10ad3ae39e6d58768c0c93b4515bb2d.tar.gz gitea-f166f9b2e10ad3ae39e6d58768c0c93b4515bb2d.zip |
Fix U2F error reasons always hidden (#16327)
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.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'web_src/js/index.js')
-rw-r--r-- | web_src/js/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index 0b5ac493ed..fc46a2e694 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -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'); } }); |