Skip to content

Commit 4eb9a79

Browse files
authored
Check bulk reply type strictly (#51)
1 parent 58a197f commit 4eb9a79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

redis.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,8 @@ class RedisImpl implements Redis {
525525
...args: (string | number)[]
526526
): Promise<BulkResult> {
527527
const [_, reply] = await this.executor.execRawReply(command, ...args);
528-
if (typeof reply !== "string" && reply != null) {
528+
// Note: `reply != null` won't work when `strict` is false #50
529+
if (typeof reply !== "string" && typeof reply !== 'undefined') {
529530
throw new Error();
530531
}
531532
return reply;

0 commit comments

Comments
 (0)