diff --git a/lib/PoolCluster.js b/lib/PoolCluster.js index a69fd2eb6..43e0e08b2 100644 --- a/lib/PoolCluster.js +++ b/lib/PoolCluster.js @@ -101,7 +101,7 @@ PoolCluster.prototype._findNodeIds = function(pattern) { if (pattern === '*') { // all foundNodeIds = this._serviceableNodeIds; - } else if (typeof this._serviceableNodeIds[pattern] !== 'undefined') { // one + } else if (this._serviceableNodeIds.indexOf(pattern) != -1) { // one foundNodeIds = [pattern]; } else { // wild matching var keyword = pattern.substring(pattern.length - 1, 0);