Skip to content

Commit 6535f17

Browse files
committed
connection.request opts may not have been set.
1 parent 6959f9b commit 6535f17

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/connection.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Connection.defaults = {
3030
extend(Connection.prototype, {
3131
request: function (opts, callback) {
3232
if (!callback) callback = noop;
33+
if (!opts) opts = {};
3334
var body = opts.body,
3435
headers = {'content-type': 'text/plain'};
3536

0 commit comments

Comments
 (0)