From 3ac046e2a478a88e24d5ce82d4c43cdd64dea1a2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 26 Jul 2018 16:45:47 +0200 Subject: Fix peertube on chrome --- server/lib/activitypub/videos.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server') diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts index b6f57e0ab..b3fbf88d0 100644 --- a/server/lib/activitypub/videos.ts +++ b/server/lib/activitypub/videos.ts @@ -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 } -- cgit v1.2.3