We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29cd58b commit 98beb6dCopy full SHA for 98beb6d
lib/infer/return.js
@@ -32,7 +32,7 @@ module.exports = function () {
32
fn.returnType &&
33
fn.returnType.typeAnnotation) {
34
var returnType = flowDoctrine(fn.returnType.typeAnnotation);
35
- if (comment.returns) {
+ if (comment.returns && comment.returns.length > 0) {
36
comment.returns[0].type = returnType;
37
} else {
38
comment.returns = [{
0 commit comments