From bd70f0becb11c9191fffcad221059e5a4b109f69 Mon Sep 17 00:00:00 2001 From: DirtyRacer1337 Date: Thu, 3 Oct 2024 16:48:42 +0700 Subject: [PATCH] [Stats] fix NaN (#446) --- plugins/stats/stats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/stats/stats.js b/plugins/stats/stats.js index 39addc03..2079cd0c 100644 --- a/plugins/stats/stats.js +++ b/plugins/stats/stats.js @@ -64,7 +64,7 @@ // percentage helper const percentage = (portion, total) => - ((portion / total) * 100).toFixed(2) + "%"; + (total > 0 ? ((portion / total) * 100).toFixed(2) : 0) + "%"; // *** actual stats fetching *** // performer of scenes with any StashID