Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
importImage: fixed default options
fixed `Cannot read property 'fromSrc' of undefined` exception when calling `importImage(path)`
  • Loading branch information
nahuel committed Nov 6, 2019
1 parent 005830d commit fdd19d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/docker.js
Expand Up @@ -172,8 +172,11 @@ Docker.prototype.importImage = function(file, opts, callback) {
var self = this;
if (!callback && typeof opts === 'function') {
callback = opts;
opts = {};
opts = undefined;
}

if (!opts)
opts = {};

opts.fromSrc = '-';

Expand Down

0 comments on commit fdd19d5

Please sign in to comment.