From f166f9b2e10ad3ae39e6d58768c0c93b4515bb2d Mon Sep 17 00:00:00 2001 From: Stephen Holdaway Date: Sat, 3 Jul 2021 20:19:38 +1200 Subject: [PATCH] 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 Co-authored-by: zeripath --- web_src/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'); } });