diff --git a/lib/infer/return.js b/lib/infer/return.js index 27f7d9b26..790aa7a8b 100644 --- a/lib/infer/return.js +++ b/lib/infer/return.js @@ -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 = [{