diff --git a/lib/twitter.js b/lib/twitter.js index 1dbf3e27..b5ed201d 100644 --- a/lib/twitter.js +++ b/lib/twitter.js @@ -116,11 +116,12 @@ Twitter.prototype.__request = function(method, path, params, callback) { } // Set API base - if (typeof params.base !== 'undefined') { - base = params.base; - delete params.base; + if (params) { + if (typeof params.base !== 'undefined') { + base = params.base; + delete params.base; + } } - // Build the options to pass to our custom request object var options = { method: method.toLowerCase(), // Request method - get || post