From ecfe4717e0df636a7c5e15f1249f3c7da3fd8a0f Mon Sep 17 00:00:00 2001 From: taichan <40626578+taichanNE30@users.noreply.github.com> Date: Fri, 27 Oct 2023 18:36:08 +0900 Subject: [PATCH] Update packages/backend/src/core/FeaturedService.ts Co-authored-by: syuilo --- packages/backend/src/core/FeaturedService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/FeaturedService.ts b/packages/backend/src/core/FeaturedService.ts index 73b3031443..9617f83880 100644 --- a/packages/backend/src/core/FeaturedService.ts +++ b/packages/backend/src/core/FeaturedService.ts @@ -52,7 +52,7 @@ export class FeaturedService { `${name}:${currentWindow}`, 0, threshold, 'REV', 'WITHSCORES'); redisPipeline.zrange( `${name}:${previousWindow}`, 0, threshold, 'REV', 'WITHSCORES'); - const [currentRankingResult, previousRankingResult] = await redisPipeline.exec().then(result => result ? result.map(r => (r[1] || []) as string[]) : [[], []]); + const [currentRankingResult, previousRankingResult] = await redisPipeline.exec().then(result => result ? result.map(r => (r[1] ?? []) as string[]) : [[], []]); const ranking = new Map(); for (let i = 0; i < currentRankingResult.length; i += 2) {