Skip to content

Commit

Permalink
Fix PoolCluster _findCaches to be plain object
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Mar 23, 2015
1 parent b9406fa commit 7862da4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/PoolCluster.js
Expand Up @@ -144,8 +144,12 @@ PoolCluster.prototype.getConnection = function(pattern, selector, cb) {
namespace.getConnection(cb);
};

PoolCluster.prototype._clearFindCaches = function _clearFindCaches() {
this._findCaches = Object.create(null);
};

PoolCluster.prototype._findNodeIds = function(pattern) {
if (typeof this._findCaches[pattern] !== 'undefined') {
if (this._findCaches[pattern] !== undefined) {
return this._findCaches[pattern];
}

Expand Down Expand Up @@ -214,10 +218,6 @@ PoolCluster.prototype._getConnection = function(node, cb) {
});
};

PoolCluster.prototype._clearFindCaches = function() {
this._findCaches = {};
};

/**
* PoolNamespace
*/
Expand Down

0 comments on commit 7862da4

Please sign in to comment.