We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c991733 commit 07a2961Copy full SHA for 07a2961
packages/utils/ast-utils.ts
@@ -394,7 +394,7 @@ function isType(path: Node, type: string): boolean {
394
function findObjWithOneOfKeys(p: Node, keyNames: string[]): boolean {
395
return (p.value as Node).properties.reduce((predicate: boolean, prop: Node): boolean => {
396
const name: string = prop.key.name;
397
- return keyNames.indexOf(name) > -1 || predicate;
+ return keyNames.includes(name) || predicate;
398
}, false);
399
}
400
0 commit comments