From 748c799a5ba1e460f01d8b6a20c47af7a7c2c098 Mon Sep 17 00:00:00 2001 From: Adrian Ferreres Esteller Date: Thu, 17 Jan 2019 07:37:54 +0100 Subject: [PATCH] Check if http.METHODS exists and if it is an array with values --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7f730d5..05b331f 100644 --- a/index.js +++ b/index.js @@ -31,7 +31,7 @@ function getCurrentNodeMethods () { return method.toLowerCase() }); - return methods; + return (methods && methods.length > 0) ? methods : false; } /**