Skip to content

Commit bc73891

Browse files
committed
fix: different flatMap import
1 parent cf7f4ff commit bc73891

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/propTypes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ module.exports = function propTypesInstructions(context, components, utils) {
290290
}
291291
// the game here is to find the type declaration in the code
292292
const candidateTypes = context.getSourceCode().ast.body.filter((item) => item.type === 'VariableDeclaration' && item.kind === 'type');
293-
const declarations = Array.prototype.flatMap(candidateTypes, (type) => type.declarations);
293+
const declarations = flatMap(candidateTypes, (type) => type.declarations);
294294

295295
// we tried to find either an interface or a type with the TypeReference name
296296
const typeDeclaration = declarations.find((dec) => dec.id.name === typeName);

0 commit comments

Comments
 (0)