Skip to content

Commit 014f5be

Browse files
committed
Default constructor case
1 parent 720014c commit 014f5be

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/docker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ var EventEmitter = require('events').EventEmitter,
2020

2121
var Docker = function(opts) {
2222
if (!(this instanceof Docker)) return new Docker(opts);
23+
2324
this.modem = new Modem(opts);
24-
this.modem.Promise = opts.Promise || global.Promise;
25+
26+
this.modem.Promise = opts && opts.Promise || global.Promise;
2527
};
2628

2729
/**

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "dockerode",
33
"description": "Docker Remote API module.",
4-
"version": "2.3.3",
4+
"version": "2.3.4",
55
"author": "Pedro Dias <petermdias@gmail.com>",
66
"maintainers": [
77
"apocas <petermdias@gmail.com>"

0 commit comments

Comments
 (0)