Skip to content

Commit

Permalink
fix(app): allow empty sub-module invokation arguments
Browse files Browse the repository at this point in the history
Previously, when instantiating a sub-module after providing global
configuration details, we were still requiring an `options` object, even
though it is meant to be optional.
  • Loading branch information
stephenplusplus committed Sep 16, 2014
1 parent 7c15974 commit 959e92e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/datastore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Datastore.dataset = Dataset;
* @return {module:datastore/dataset}
*/
Datastore.prototype.dataset = function(options) {
options = options || {};
// Mix in global config data to the provided options.
return new Dataset(util.extendGlobalConfig(this.config, options));
};
Expand Down
1 change: 1 addition & 0 deletions lib/storage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ Storage.bucket = Bucket;
* });
*/
Storage.prototype.bucket = function(options) {
options = options || {};
// Mix in instance config data to the provided options.
return new Bucket(util.extendGlobalConfig(this.config, options));
};
Expand Down

0 comments on commit 959e92e

Please sign in to comment.