Skip to content

Commit 6ec2ddc

Browse files
author
Ivan Grekov
committed
update to 1.1.1
1 parent 02e13d7 commit 6ec2ddc

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v.1.1.1
4+
5+
* Fix bug for params, which are imported
6+
37
## v.1.1.0
48

59
* Fix bug for params and arguments defined via destruction

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ function setParamsTypeDefinitionFromFunctionType(documentation, path) {
5353

5454
if (
5555
path.node.type === 'ArrowFunctionExpression' &&
56-
!path.parentPath.node.init.params[0].typeAnnotation
56+
(
57+
path.parentPath.node.init &&
58+
path.parentPath.node.init.params &&
59+
path.parentPath.node.init.params[0] &&
60+
!path.parentPath.node.init.params[0].typeAnnotation
61+
)
5762
) {
5863
const paramTypeName = setParamTypeName(path);
5964

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-react-function-component-props-handler",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "a custom react function components props handler for react-docgen. It allows you to parse props, which are typed as React.functionComponent<props> without rewriting your code",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)