Skip to content

Commit

Permalink
fix: remove extra typeof in .to cluster helper
Browse files Browse the repository at this point in the history
  • Loading branch information
AVVS committed Jan 25, 2016
1 parent ba12e47 commit a7b0bfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit a7b0bfe

Please sign in to comment.