diff options
author | Pierre Ossman <ossman@cendio.se> | 2019-12-23 15:11:32 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2019-12-23 15:42:02 +0100 |
commit | b8d1a8bb57c0e1bff08ea5df2c62b9479ce49d02 (patch) | |
tree | 8954ec625557ab4f3842b952461a06a04856249b | |
parent | 2cf82a5c8eb6afaa6934a084aa6122d35c972a80 (diff) | |
download | novnc-b8d1a8bb57c0e1bff08ea5df2c62b9479ce49d02.tar.gz |
Avoid using Array.includes()
Internet Explorer doesn't have this method. Use the safer indexOf()
instead.
-rw-r--r-- | app/ui.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |