1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

fix: zero ttl is ignored (#2349)

* fix: zero ttl is ignored

* Update SET.ts

* Update SET.ts

Co-authored-by: Leibale Eidelman <me@leibale.com>
This commit is contained in:
Vojtech Novak
2022-12-15 18:04:13 +01:00
committed by GitHub
parent ce1b8f7f4e
commit f6093b7b0f
2 changed files with 14 additions and 14 deletions

View File

@@ -35,13 +35,13 @@ export function transformArguments(
typeof value === 'number' ? value.toString() : value
];
if (options?.EX) {
if (options?.EX !== undefined) {
args.push('EX', options.EX.toString());
} else if (options?.PX) {
} else if (options?.PX !== undefined) {
args.push('PX', options.PX.toString());
} else if (options?.EXAT) {
} else if (options?.EXAT !== undefined) {
args.push('EXAT', options.EXAT.toString());
} else if (options?.PXAT) {
} else if (options?.PXAT !== undefined) {
args.push('PXAT', options.PXAT.toString());
} else if (options?.KEEPTTL) {
args.push('KEEPTTL');