diff --git a/lib/index.js b/lib/index.js index 6b38df6..834208e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -237,6 +237,11 @@ CloudFront.prototype.deleteDistribution = function(distribution, etag, opts, cb) }; CloudFront.prototype.listDistributions = function(opts, cb) { + if (arguments.length === 1) { + cb = opts; + opts = {}; + } + var self = this; this.request('GET', listOptsToPath('distribution', opts), function(err, body) { if (err) return cb(err); @@ -273,6 +278,11 @@ CloudFront.prototype.getInvalidation = function(distribution, id, cb) { }; CloudFront.prototype.listInvalidations = function(distribution, opts, cb) { + if (arguments.length === 2) { + cb = opts; + opts = {}; + } + var self = this; this.request('GET', listOptsToPath('distribution/' + distribution + '/invalidation', opts), function(err, body) { if (err) return cb(err);