Current behavior
The vue-docgen-api parser fails to parse the prop validator function with TypeError: Cannot read property '0' of undefined.

Since the parsing fails, the respective component will be ignored from the guide.
To reproduce
This happens when a prop validator is defined through a variable name rather than an inline function or lambda.
myValidatorfunction myValidator(value) {
return value.length = 3;
}
props: {
color: {
type: String,
validator: myValidator,
},
},
Expected behavior
The parsing of the validator function should work even if it is not written inline.
I've hit this same issue using Vue and Storybook and tracked it down to this line:
For future reference, the error I was getting was
[vue-docgen-loader] failed to parse the component file with docgen-api: Cannot read property '0' of undefined
Thank you @lopis,
This is super helpful.
I will create a PR today.
Most helpful comment
Thank you @lopis,
This is super helpful.
I will create a PR today.