mirror of
https://github.com/documentationjs/documentation.git
synced 2026-01-25 14:26:29 +00:00
Check length before assigning to a return tag (#606)
This commit is contained in:
parent
29cd58bb31
commit
98beb6dbd8
@ -32,7 +32,7 @@ module.exports = function () {
|
||||
fn.returnType &&
|
||||
fn.returnType.typeAnnotation) {
|
||||
var returnType = flowDoctrine(fn.returnType.typeAnnotation);
|
||||
if (comment.returns) {
|
||||
if (comment.returns && comment.returns.length > 0) {
|
||||
comment.returns[0].type = returnType;
|
||||
} else {
|
||||
comment.returns = [{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user