Skip to content

Commit

Permalink
fix: fixed issue Azure-Samples#280 the value might was set after use …
Browse files Browse the repository at this point in the history
…leading to inconsistency
  • Loading branch information
Tanmai2002 committed Aug 16, 2023
1 parent 431e534 commit f5059f1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class BookingFormComponent implements OnInit {
return;
}

const rentPriceWithDiscount = this.monthlyRentPrice() * (1 - (parseInt(this.listing?.fees?.[4], 10) || 0) / 100);
const rentPriceWithDiscount = (Number(this.listing?.fees?.[3]) || 0)* (1 - (parseInt(this.listing?.fees?.[4], 10) || 0) / 100);
this.monthlyRentPrice.set(Number(this.listing?.fees?.[3]) || 0);
this.monthlyRentPriceWithDiscount.set(Math.max(0, rentPriceWithDiscount));
this.currency_code = this.listing?.fees?.[5].substring(0, 3);
Expand Down

0 comments on commit f5059f1

Please sign in to comment.