Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuruog committed Sep 6, 2020
1 parent 6bd3c01 commit 59aaaae
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/loaders/utils/getProps.ts
Expand Up @@ -94,7 +94,15 @@ export default function getProps(doc: DocumentationObject, filepath?: string): R
allTags as TagProps,
JS_DOC_METHOD_RETURN_TAG_SYNONYMS
) as TagParamObject[];
const returns = (method.returns || returnTags[0]) && { ...method.returns, ...returnTags[0] };
const returns = method.returns
? {
...method.returns,
type: {
type: 'NameExpression',
...method.returns.type,
},
}
: returnTags[0];

if (returns) {
method.returns = returns;
Expand Down

0 comments on commit 59aaaae

Please sign in to comment.