From 21c33623286d5fa71dcd3015517a182a94a6e12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Sat, 15 Jun 2024 22:05:34 +0200 Subject: [PATCH] #448 - Fix division by zero. --- src/Money.Blazor.Host/Pages/TrendsYear.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Money.Blazor.Host/Pages/TrendsYear.razor b/src/Money.Blazor.Host/Pages/TrendsYear.razor index ea2db6aa..6e53c507 100644 --- a/src/Money.Blazor.Host/Pages/TrendsYear.razor +++ b/src/Money.Blazor.Host/Pages/TrendsYear.razor @@ -12,7 +12,7 @@ else
@foreach (var model in Models) { - var size = model.TotalAmount.Value / MaxAmount * 100; + var size = MaxAmount == 0 ? 0 : model.TotalAmount.Value / MaxAmount * 100;