X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fredis.ts;h=257cce1418b6338a25c4b6c65fb43ad97e8006c0;hb=aaedadd5386b580e9ebac540201399c25c7f0b0f;hp=4325598b2f3df6c2cf35adfcfb1ff3447c08ab9a;hpb=e4bf78561763cd84d22ebceb6f371cccf9a356d8;p=github%2FChocobozzz%2FPeerTube.git 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 { } private generateVideoViewKey (videoId: number, hour?: number) { - if (!hour) hour = new Date().getHours() + if (hour === undefined || hour === null) hour = new Date().getHours() return `video-view-${videoId}-h${hour}` }