Skip to content

Commit

Permalink
fix: fix for when rent range was empty
Browse files Browse the repository at this point in the history
  • Loading branch information
YazeedLoonat committed Mar 10, 2022
1 parent 852a4a5 commit d151630
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/core/src/shared/units-transformations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const getUnitGroupSummary = (unitGroups: UnitGroup[] = []): UnitGroupSumm
let rentAsPercentIncomeRange: MinMax, rentRange: MinMax, amiPercentageRange: MinMax
group.amiLevels.forEach((level) => {
if (level.monthlyRentDeterminationType === MonthlyRentDeterminationType.flatRent) {
rentRange = setMinMax(rentRange, Number(level.flatRentValue))
rentRange = setMinMax(rentRange, level.flatRentValue)
} else {
rentAsPercentIncomeRange = setMinMax(
rentAsPercentIncomeRange,
Expand All @@ -49,8 +49,8 @@ export const getUnitGroupSummary = (unitGroups: UnitGroup[] = []): UnitGroupSumm
.map((type) => type.name),
rentAsPercentIncomeRange,
rentRange: rentRange && {
min: `$${rentRange.min}`,
max: `$${rentRange.max}`,
min: rentRange.min ? `$${rentRange.min}` : "",
max: rentRange.max ? `$${rentRange.max}` : "",
},
amiPercentageRange,
openWaitlist: group.openWaitlist,
Expand Down

0 comments on commit d151630

Please sign in to comment.