From 00fbdfb0942dd7013a269835c5bb9c715dd14913 Mon Sep 17 00:00:00 2001 From: Ryan Giglio Date: Sat, 2 Dec 2017 23:56:39 -0500 Subject: [PATCH] Fix issue where promise-style requests throw an error if no params are passed --- lib/twitter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/twitter.js b/lib/twitter.js index 1dbf3e27..909dc575 100644 --- a/lib/twitter.js +++ b/lib/twitter.js @@ -116,7 +116,7 @@ Twitter.prototype.__request = function(method, path, params, callback) { } // Set API base - if (typeof params.base !== 'undefined') { + if (params && typeof params.base !== 'undefined') { base = params.base; delete params.base; }