Add "eqeqeq" eslint rule
This commit is contained in:
parent
3741a88ad7
commit
334f12c28e
3 changed files with 7 additions and 6 deletions
|
@ -97,12 +97,12 @@ function showMain() {
|
|||
//
|
||||
// So I guess you could say things are getting pretty interoperable.
|
||||
function getVirtualKey(ev) {
|
||||
if ("key" in ev && typeof ev.key != "undefined") {
|
||||
if ("key" in ev && typeof ev.key !== "undefined") {
|
||||
return ev.key;
|
||||
}
|
||||
|
||||
const c = ev.charCode || ev.keyCode;
|
||||
if (c == 27) {
|
||||
if (c === 27) {
|
||||
return "Escape";
|
||||
}
|
||||
return String.fromCharCode(c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue