From dbf813e3f40754eef8e1fc632071da428b66caa1 Mon Sep 17 00:00:00 2001 From: leibale Date: Thu, 10 Jun 2021 10:52:05 -0400 Subject: [PATCH] fix KEEPTTL in SET --- lib/commands/SET.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/commands/SET.ts b/lib/commands/SET.ts index 1c58d264a0..4d5919cde2 100644 --- a/lib/commands/SET.ts +++ b/lib/commands/SET.ts @@ -53,6 +53,8 @@ export function transformArguments(key: string, value: string, options?: SetOpti args.push('EXAT', options.EXAT.toString()); } else if ('PXAT' in options) { args.push('PXAT', options.PXAT.toString()); + } else if ((options).KEEPTTL) { + args.push('KEEPTTL'); } if ((options).NX) { @@ -61,10 +63,6 @@ export function transformArguments(key: string, value: string, options?: SetOpti args.push('XX'); } - if ((options).KEEPTTL) { - args.push('KEEPTTL'); - } - if ((options).GET) { args.push('GET'); }