diff --git a/packages/time-series/lib/commands/index.ts b/packages/time-series/lib/commands/index.ts index 19cd075ba49..356b0416648 100644 --- a/packages/time-series/lib/commands/index.ts +++ b/packages/time-series/lib/commands/index.ts @@ -128,7 +128,7 @@ export function transformTimestampArgument(timestamp: Timestamp): string { } export function pushRetentionArgument(args: RedisCommandArguments, retention?: number): RedisCommandArguments { - if (retention) { + if (retention !== undefined) { args.push( 'RETENTION', retention.toString() @@ -144,7 +144,7 @@ export enum TimeSeriesEncoding { } export function pushEncodingArgument(args: RedisCommandArguments, encoding?: TimeSeriesEncoding): RedisCommandArguments { - if (encoding) { + if (encoding !== undefined) { args.push( 'ENCODING', encoding @@ -155,7 +155,7 @@ export function pushEncodingArgument(args: RedisCommandArguments, encoding?: Tim } export function pushChunkSizeArgument(args: RedisCommandArguments, chunkSize?: number): RedisCommandArguments { - if (chunkSize) { + if (chunkSize !== undefined) { args.push( 'CHUNK_SIZE', chunkSize.toString() @@ -166,7 +166,7 @@ export function pushChunkSizeArgument(args: RedisCommandArguments, chunkSize?: n } export function pushDuplicatePolicy(args: RedisCommandArguments, duplicatePolicy?: TimeSeriesDuplicatePolicies): RedisCommandArguments { - if (duplicatePolicy) { + if (duplicatePolicy !== undefined) { args.push( 'DUPLICATE_POLICY', duplicatePolicy