aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/redis.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/redis.ts')
-rw-r--r--server/lib/redis.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/lib/redis.ts b/server/lib/redis.ts
index 4325598b2..257cce141 100644
--- a/server/lib/redis.ts
+++ b/server/lib/redis.ts
@@ -215,7 +215,7 @@ class Redis {
215 } 215 }
216 216
217 private generateVideoViewKey (videoId: number, hour?: number) { 217 private generateVideoViewKey (videoId: number, hour?: number) {
218 if (!hour) hour = new Date().getHours() 218 if (hour === undefined || hour === null) hour = new Date().getHours()
219 219
220 return `video-view-${videoId}-h${hour}` 220 return `video-view-${videoId}-h${hour}`
221 } 221 }