Skip to content

Commit 0131ecf

Browse files
author
avifenesh
committed
Fix type assertion for Buffer conversion in BaseClient and GlideClusterClient
Signed-off-by: avifenesh <[email protected]>
1 parent f9a09b0 commit 0131ecf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

node/src/BaseClient.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3861,8 +3861,8 @@ export class BaseClient {
38613861
): Promise<GlideReturnType> {
38623862
const scriptInvocation = command_request.ScriptInvocation.create({
38633863
hash: script.getHash(),
3864-
keys: options?.keys?.map(Buffer.from),
3865-
args: options?.args?.map(Buffer.from),
3864+
keys: options?.keys?.map(key => Buffer.from(key as string)),
3865+
args: options?.args?.map(arg => Buffer.from(arg as string)),
38663866
});
38673867
return this.createScriptInvocationPromise(scriptInvocation, options);
38683868
}

node/src/GlideClusterClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ export class GlideClusterClient extends BaseClient {
613613
command.cursor = cursor;
614614

615615
if (options?.match) {
616-
command.matchPattern = Buffer.from(options.match);
616+
command.matchPattern = Buffer.from(options.match as string);
617617
}
618618

619619
if (options?.count) {

0 commit comments

Comments
 (0)