From b50cbfd4e0dab135aeaa479e627f1bbe77e6b788 Mon Sep 17 00:00:00 2001 From: Aubrey Hewes Date: Mon, 25 Sep 2017 19:49:56 +0200 Subject: [PATCH] fix self reference --- src/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.js b/src/index.js index e89310b..b658dd8 100644 --- a/src/index.js +++ b/src/index.js @@ -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;