Skip to content

Commit

Permalink
Merge pull request #5 from kingsquare/dev-fix-self
Browse files Browse the repository at this point in the history
fix self reference
  • Loading branch information
Reggino committed Sep 25, 2017
2 parents 25034d1 + b50cbfd commit 9303c84
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ Connector.prototype.getIds = function (objectType, selector, params) {
result = this.search(objectType, selector, Object.assign({ fields: '_id' }, params)).then(results => results.map(result => result._id));

if (this.cache) {
var self = this;
return result.then(function (ids) {
self.cache.getIdsCaches[objectType].set(hash, ids);
return ids;
Expand Down

0 comments on commit 9303c84

Please sign in to comment.