Skip to content

Commit

Permalink
Add fallback for null value in unitAmountExcludingTax method (#1447)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayan-blutui authored Sep 27, 2022
1 parent 15b6a1d commit e0d5998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InvoiceLineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function total()
*/
public function unitAmountExcludingTax()
{
return $this->formatAmount($this->item->unit_amount_excluding_tax);
return $this->formatAmount($this->item->unit_amount_excluding_tax ?? 0);
}

/**
Expand Down

0 comments on commit e0d5998

Please sign in to comment.