Skip to content

Commit

Permalink
Check if http.METHODS exists and if it is an array with values
Browse files Browse the repository at this point in the history
  • Loading branch information
ardiadrianadri committed Jan 17, 2019
1 parent cdf1693 commit 748c799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function getCurrentNodeMethods () {
return method.toLowerCase()
});

return methods;
return (methods && methods.length > 0) ? methods : false;
}

/**
Expand Down

0 comments on commit 748c799

Please sign in to comment.