]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/videos.ts
Fix peertube on chrome
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / videos.ts
index b6f57e0abe884cc6c0945e09021760b624e4f804..b3fbf88d0eae6979e83de85e68cdc04320f0d632 100644 (file)
@@ -287,7 +287,7 @@ async function createRates (actorUrls: string[], video: VideoModel, rate: VideoR
   logger.info('Adding %d %s to video %s.', rateCounts, rate, video.uuid)
 
   // This is "likes" and "dislikes"
-  await video.increment(rate + 's', { by: rateCounts })
+  if (rateCounts !== 0) await video.increment(rate + 's', { by: rateCounts })
 
   return
 }