Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7862da4

Browse filesBrowse files
committed
Fix PoolCluster _findCaches to be plain object
1 parent b9406fa commit 7862da4
Copy full SHA for 7862da4

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎lib/PoolCluster.js

Copy file name to clipboardExpand all lines: lib/PoolCluster.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,12 @@ PoolCluster.prototype.getConnection = function(pattern, selector, cb) {
144144
namespace.getConnection(cb);
145145
};
146146

147+
PoolCluster.prototype._clearFindCaches = function _clearFindCaches() {
148+
this._findCaches = Object.create(null);
149+
};
150+
147151
PoolCluster.prototype._findNodeIds = function(pattern) {
148-
if (typeof this._findCaches[pattern] !== 'undefined') {
152+
if (this._findCaches[pattern] !== undefined) {
149153
return this._findCaches[pattern];
150154
}
151155

@@ -214,10 +218,6 @@ PoolCluster.prototype._getConnection = function(node, cb) {
214218
});
215219
};
216220

217-
PoolCluster.prototype._clearFindCaches = function() {
218-
this._findCaches = {};
219-
};
220-
221221
/**
222222
* PoolNamespace
223223
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.