From b8d1a8bb57c0e1bff08ea5df2c62b9479ce49d02 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 23 Dec 2019 15:11:32 +0100 Subject: [PATCH] Avoid using Array.includes() Internet Explorer doesn't have this method. Use the safer indexOf() instead. --- app/ui.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ui.js b/app/ui.js index 7651d3e5..347a2af8 100644 --- a/app/ui.js +++ b/app/ui.js @@ -1152,12 +1152,12 @@ const UI = { document.getElementById("noVNC_password_block").classList.remove("noVNC_hidden"); let inputFocus = "none"; - if (!e.detail.types.includes("username")) { + if (e.detail.types.indexOf("username") === -1) { document.getElementById("noVNC_username_block").classList.add("noVNC_hidden"); } else { inputFocus = inputFocus === "none" ? "noVNC_username_input" : inputFocus; } - if (!e.detail.types.includes("password")) { + if (e.detail.types.indexOf("password") === -1) { document.getElementById("noVNC_password_block").classList.add("noVNC_hidden"); } else { inputFocus = inputFocus === "none" ? "noVNC_password_input" : inputFocus;