Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Jan 8, 2024
2 parents e93dd6a + 4cec8be commit a6f378f
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 a6f378f

Please sign in to comment.