refactor: includes instead of indexOf (#5117)

This commit is contained in:
btea
2022-01-21 01:36:48 -06:00
committed by GitHub
parent c64907d261
commit 63210fe41a
4 changed files with 7 additions and 7 deletions

View File

@@ -157,7 +157,7 @@ export function legacyCheckKeyCodes(
function isKeyNotMatch<T>(expect: T | T[], actual: T): boolean {
if (isArray(expect)) {
return expect.indexOf(actual) === -1
return !expect.includes(actual)
} else {
return expect !== actual
}