Skip to content

Commit bcb3f72

Browse files
committed
guard for 0
1 parent 30d9800 commit bcb3f72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/lib/service/download_counts/package_trends.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ double computeRelativeGrowthRate(List<int> totalDownloads) {
3535
recentDownloads.reduce((prev, element) => prev + element) /
3636
recentDownloads.length;
3737

38-
if (averageRecentDownloads.abs() < 1e-9) {
38+
if (averageRecentDownloads == 0) {
3939
return 0;
4040
}
4141

0 commit comments

Comments
 (0)