From a7b0bfe02010cb55e4fc0ba729127b6ced405e33 Mon Sep 17 00:00:00 2001 From: Vitaly Aminev Date: Mon, 25 Jan 2016 20:47:03 +0300 Subject: [PATCH] fix: remove extra typeof in .to cluster helper --- lib/cluster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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');