From 4cec8be7276e2ad5a5fb0655b11c67b228585264 Mon Sep 17 00:00:00 2001 From: tokebe <43009413+tokebe@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:13:31 -0500 Subject: [PATCH] fix: prefixing args for cluster --- src/redis-client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redis-client.ts b/src/redis-client.ts index 785a6090..f48419a6 100644 --- a/src/redis-client.ts +++ b/src/redis-client.ts @@ -32,8 +32,8 @@ function timeoutFunc(func: F, timeoutms = 0) { */ function addPrefix(func: F) { return (arg0: Parameters[0], ...args: DropFirst>): ReturnType => { - if (args.length > 0) { - arg0 = `${prefix}${arg0}`; + if (arg0 && (arg0 as string).length > 0) { + arg0 = `${prefix}${arg0 as string}`; } return func(arg0, ...args) as ReturnType; };