You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
fix legacy mode resp encoder (#2118)
* fix legacy mode resp encoder * Update encoder.ts
This commit is contained in:
@@ -123,7 +123,11 @@ export function transformCommandArguments<T>(
|
||||
}
|
||||
|
||||
export function transformLegacyCommandArguments(args: Array<any>): Array<any> {
|
||||
return args.flat().map(x => x?.toString?.());
|
||||
return args.flat().map(arg => {
|
||||
return typeof arg === 'number' || arg instanceof Date ?
|
||||
arg.toString() :
|
||||
arg;
|
||||
});
|
||||
}
|
||||
|
||||
export function transformCommandReply<C extends RedisCommand>(
|
||||
|
Reference in New Issue
Block a user