diff --git a/lib/cluster/index.ts b/lib/cluster/index.ts index 39c97680..c26fd28d 100644 --- a/lib/cluster/index.ts +++ b/lib/cluster/index.ts @@ -776,6 +776,9 @@ class Cluster extends EventEmitter { const keys = []; for (let j = 2; j < items.length; j++) { + if (!items[j][0]) { + continue; + } items[j] = this.natMapper({ host: items[j][0], port: items[j][1] }); items[j].readOnly = j !== 2; nodes.push(items[j]);