diff --git a/lib/docker.js b/lib/docker.js index a59ec37..7240c40 100644 --- a/lib/docker.js +++ b/lib/docker.js @@ -20,8 +20,10 @@ var EventEmitter = require('events').EventEmitter, var Docker = function(opts) { if (!(this instanceof Docker)) return new Docker(opts); + this.modem = new Modem(opts); - this.modem.Promise = opts.Promise || global.Promise; + + this.modem.Promise = opts && opts.Promise || global.Promise; }; /** diff --git a/package.json b/package.json index e37ad1f..157cab7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dockerode", "description": "Docker Remote API module.", - "version": "2.3.3", + "version": "2.3.4", "author": "Pedro Dias ", "maintainers": [ "apocas "