Skip to content

Commit bd70f0b

Browse files
[Stats] fix NaN (#446)
1 parent 4d27274 commit bd70f0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/stats/stats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
// percentage helper
6666
const percentage = (portion, total) =>
67-
((portion / total) * 100).toFixed(2) + "%";
67+
(total > 0 ? ((portion / total) * 100).toFixed(2) : 0) + "%";
6868

6969
// *** actual stats fetching ***
7070
// performer of scenes with any StashID

0 commit comments

Comments
 (0)