Skip to content

Commit 07a2961

Browse files
feat: refactor
use includes to check for existence
1 parent c991733 commit 07a2961

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/utils/ast-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ function isType(path: Node, type: string): boolean {
394394
function findObjWithOneOfKeys(p: Node, keyNames: string[]): boolean {
395395
return (p.value as Node).properties.reduce((predicate: boolean, prop: Node): boolean => {
396396
const name: string = prop.key.name;
397-
return keyNames.indexOf(name) > -1 || predicate;
397+
return keyNames.includes(name) || predicate;
398398
}, false);
399399
}
400400

0 commit comments

Comments
 (0)