types: improve isDef typing (#7124)

* types: improve isDef typing

* chore: update
This commit is contained in:
neverland
2020-09-07 20:16:54 +08:00
committed by GitHub
parent afe4248799
commit c7303786ae
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -27,12 +27,13 @@ function formatValue(props: CouponCellProps) {
if (coupon) {
let value = 0;
if (isDef(coupon.value)) {
({ value } = coupon);
}
if (isDef(coupon.denominations)) {
value = coupon.denominations!;
value = coupon.denominations;
}
return `-${currency} ${(value / 100).toFixed(2)}`;