Skip to content

Commit

Permalink
Default constructor case
Browse files Browse the repository at this point in the history
  • Loading branch information
apocas committed Mar 10, 2017
1 parent 720014c commit 014f5be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dockerode",
"description": "Docker Remote API module.",
"version": "2.3.3",
"version": "2.3.4",
"author": "Pedro Dias <[email protected]>",
"maintainers": [
"apocas <[email protected]>"
Expand Down

0 comments on commit 014f5be

Please sign in to comment.