Skip to content

Commit

Permalink
fix #2481 - fix "falsy" arguments in TS.ALTER (#2483)
Browse files Browse the repository at this point in the history
  • Loading branch information
leibale committed Apr 26, 2023
1 parent ba31c8a commit 986a510
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/time-series/lib/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -144,7 +144,7 @@ export enum TimeSeriesEncoding {
}

export function pushEncodingArgument(args: RedisCommandArguments, encoding?: TimeSeriesEncoding): RedisCommandArguments {
if (encoding) {
if (encoding !== undefined) {
args.push(
'ENCODING',
encoding
Expand All @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit 986a510

Please sign in to comment.