Skip to content

Commit

Permalink
bugfix in UpdateChangeInXUnits for blank FamilyData
Browse files Browse the repository at this point in the history
  • Loading branch information
rrelyea committed Mar 14, 2024
1 parent 5a0cc72 commit f2d9c90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Models/FamilyData/FamilyData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ internal void UpdateValueInXUnits()

internal void UpdateChangeInXUnits()
{
double? changeInXUnits = (double)(Change) / (double)(EmergencyFund.AnnualExpenses ?? 0.0);
double? changeInXUnits = (double?)(Change) / (double)(EmergencyFund.AnnualExpenses ?? 0.0);
if (changeInXUnits.HasValue && (double.IsNaN(changeInXUnits.Value) || double.IsInfinity(changeInXUnits.Value)))
{
changeInXUnits = null;
Expand Down

0 comments on commit f2d9c90

Please sign in to comment.