Browse Source

Improve fallback

pull/1452/head
Thomas 3 years ago
parent
commit
4adce5eecf
  1. 4
      apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.component.ts

4
apps/client/src/app/pages/blog/2022/11/black-friday-2022/black-friday-2022-page.component.ts

@ -13,8 +13,8 @@ export class BlackFriday2022PageComponent {
public constructor(private dataService: DataService) { public constructor(private dataService: DataService) {
const { subscriptions } = this.dataService.fetchInfo(); const { subscriptions } = this.dataService.fetchInfo();
const coupon = subscriptions?.[0]?.coupon; const coupon = subscriptions?.[0]?.coupon ?? 0;
const price = subscriptions?.[0]?.price; const price = subscriptions?.[0]?.price ?? 1;
this.discount = Math.floor((coupon / price) * 100) / 100; this.discount = Math.floor((coupon / price) * 100) / 100;
} }

Loading…
Cancel
Save