Skip to content

Commit a7b0bfe

Browse files
committed
fix: remove extra typeof in .to cluster helper
1 parent ba12e47 commit a7b0bfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cluster.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ Cluster.prototype.executeClusterDownCommands = function () {
401401

402402
Cluster.prototype.to = function (name) {
403403
var fnName = '_select' + name[0].toUpperCase() + name.slice(1);
404-
var fn = typeof this[fnName];
404+
var fn = this[fnName];
405405
if (typeof fn !== 'function') {
406406
// programmatic error, can't happen in prod, so throw
407407
throw new Error('to ' + name + ' is not a valid group of nodes');

0 commit comments

Comments
 (0)