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.
2 parents 52e48ce + 4b72131 commit 1f5edceCopy full SHA for 1f5edce
index.js
@@ -47,10 +47,15 @@ function checkForProptypes(path, paramTypeName) {
47
}
48
49
function setParamsTypeDefinitionFromFunctionType(documentation, path) {
50
- if (path.parentPath.node.init && path.parentPath.node.init.params.length === 0) {
+ if (
51
+ path.parentPath.node.init &&
52
+ Array.isArray(path.parentPath.node.init.params) &&
53
+ path.parentPath.node.init.params.length === 0
54
+ )
55
+ {
56
return;
- }
-
57
+ }
58
+
59
if (
60
path.node.type === 'ArrowFunctionExpression' &&
61
(
0 commit comments