Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Commit

Permalink
Update database.js (#395)
Browse files Browse the repository at this point in the history
throwing away a useless Promise.
  • Loading branch information
vitaly-t authored and dmfay committed Jun 21, 2017
1 parent c2b0433 commit 0d3f33c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/database.js
Expand Up @@ -62,7 +62,7 @@ Massive.prototype.attach = function (ctor, ...sources) {
});

return Promise.all(sourcePromises).then(result => {
return Promise.resolve(_.flatten(result).map(spec => {
return _.flatten(result).map(spec => {
spec = _.extend(spec, this.loaderConfig);
spec.db = this;
spec.path = !spec.schema || spec.schema === 'public' ? spec.name : [spec.schema, spec.name].join('.');
Expand All @@ -77,7 +77,7 @@ Massive.prototype.attach = function (ctor, ...sources) {
_.set(this, spec.path, executor || entity);

return entity;
}));
});
});
};

Expand Down

0 comments on commit 0d3f33c

Please sign in to comment.