diff --git a/lib/cluster.js b/lib/cluster.js index a7c3f8bd..4c2dd2c7 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -401,7 +401,7 @@ Cluster.prototype.executeClusterDownCommands = function () { Cluster.prototype.to = function (name) { var fnName = '_select' + name[0].toUpperCase() + name.slice(1); - var fn = typeof this[fnName]; + var fn = this[fnName]; if (typeof fn !== 'function') { // programmatic error, can't happen in prod, so throw throw new Error('to ' + name + ' is not a valid group of nodes');