Skip to content

Commit

Permalink
fix: prefixing args for cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Dec 19, 2023
1 parent 9a047d6 commit 4cec8be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/redis-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ function timeoutFunc<F extends AsyncFunction>(func: F, timeoutms = 0) {
*/
function addPrefix<F extends AsyncFunction>(func: F) {
return (arg0: Parameters<F>[0], ...args: DropFirst<Parameters<F>>): ReturnType<F> => {
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<F>;
};
Expand Down

0 comments on commit 4cec8be

Please sign in to comment.