Skip to content
This repository was archived by the owner on Mar 8, 2019. It is now read-only.

Commit 132a4a2

Browse files
committed
Updated the extraction of default functions in props
1 parent 873c7e1 commit 132a4a2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-docgen-api",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "Toolbox to extract information from Vue component files for documentation generation purposes.",
55
"bugs": {
66
"url": "https://github.com/vue-styleguidist/vue-docgen-api/issues"

src/utils/getProp.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default function getProp(prop, docPart){
3131
if (prop.default) {
3232
let value;
3333
if (typeof prop.default === 'function') {
34+
obj['type'] = { name: 'func' }
3435
var func = prop.default.toString().replace(fnNameMatchRegex, 'function');
3536
value = JSON.parse(JSON.stringify(func.replace(/\s\s+/g, ' ')))
3637
} else {

0 commit comments

Comments
 (0)