From be7882b0bb6cdb0971f76c2a5b11d5a8767a22e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricky=20=E6=B3=BD=E9=98=B3?= Date: Thu, 13 Dec 2018 11:13:05 +0800 Subject: [PATCH] optimize:do unnecessary processing when changing options to null (#2972) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f9b480a1d..d50f9917b 100755 --- a/index.js +++ b/index.js @@ -27,7 +27,7 @@ function initParams (uri, options, callback) { } var params = {} - if (typeof options === 'object') { + if (options !== null && typeof options === 'object') { extend(params, options, {uri: uri}) } else if (typeof uri === 'string') { extend(params, {uri: uri})