Skip to content

Commit

Permalink
#448 - Fix division by zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
maraf committed Jun 15, 2024
1 parent 0e5c9ee commit 21c3362
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Money.Blazor.Host/Pages/TrendsYear.razor
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ else
<div class="row no-gutters" style="min-height: calc(100vh - 332px)">
@foreach (var model in Models)
{
var size = model.TotalAmount.Value / MaxAmount * 100;
var size = MaxAmount == 0 ? 0 : model.TotalAmount.Value / MaxAmount * 100;

<div class="col-12 col-lg-1 @(model > DateTime.Today ? "text-muted" : String.Empty)">
<div class="d-none d-lg-flex p-1 p-lg-3 h-100 w-100 vertical-bar">
Expand Down

0 comments on commit 21c3362

Please sign in to comment.