From b583505e6c9362da1b8563c3deda2a6d30678db2 Mon Sep 17 00:00:00 2001 From: Stephen Holdaway Date: Fri, 2 Jul 2021 11:05:44 +1200 Subject: [PATCH] Fix U2F error reasons always hidden 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. --- 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 0b5ac493ed6a8..fc46a2e694bd0 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'); } });