1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Fix creation of cluster client again (#2870)

* shallow copy of this.#options.defaults.socket

* shallow copy of this.#options.defaults.socket

* nit

* fix redis create cluster client again

---------

Co-authored-by: Max Gruenfelder <maximilian.gruenfelder@sap.com>
Co-authored-by: Leibale Eidelman <me@leibale.com>
This commit is contained in:
Max Gruenfelder
2024-11-25 21:28:44 +01:00
committed by GitHub
parent b87b8b1134
commit 9a3e1c5e03

View File

@@ -261,10 +261,10 @@ export default class RedisClusterSlots<
let socket;
if (this.#options.defaults.socket) {
socket = options?.socket ? {
socket = {
...this.#options.defaults.socket,
...options.socket
} : this.#options.defaults.socket;
...options?.socket
};
} else {
socket = options?.socket;
}