You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
fix createCluster - copy options.defaults.socket
before modifying it (#2783)
* shallow copy of this.#options.defaults.socket * shallow copy of this.#options.defaults.socket * nit --------- Co-authored-by: Max Gruenfelder <maximilian.gruenfelder@sap.com> Co-authored-by: Leibale Eidelman <me@leibale.com>
This commit is contained in:
@@ -269,10 +269,10 @@ export default class RedisClusterSlots<
|
||||
if (this.#options.defaults) {
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user