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

fix cluster extractFirstKey skip commandOptions() passed to args (#2439)

* cluster extractFirstKey skip commandOptions() passed to args

* cluster with commandOptions unit test

* improve performance

* fix type

* fix type

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
This commit is contained in:
Carl Hopf
2023-04-26 18:56:04 +02:00
committed by GitHub
parent c88dea6151
commit e1658ba6ef
3 changed files with 20 additions and 2 deletions

View File

@@ -152,11 +152,11 @@ export default class RedisCluster<
command: C,
args: Array<unknown>
): Promise<RedisCommandReply<C>> {
const { args: redisArgs, options } = transformCommandArguments(command, args);
const { jsArgs, args: redisArgs, options } = transformCommandArguments(command, args);
return transformCommandReply(
command,
await this.sendCommand(
RedisCluster.extractFirstKey(command, args, redisArgs),
RedisCluster.extractFirstKey(command, jsArgs, redisArgs),
command.IS_READ_ONLY,
redisArgs,
options