ethercreative / web-payments

Web Payments for Craft Commerce
Other
5 stars 7 forks source link

Comparison Widget Division by zero error #17

Closed yoannisj closed 4 years ago

yoannisj commented 4 years ago

Adding a "Web Payments Comparison" widget to the dashboard when there are no orders in the database throws a "Division by Zero" error: https://github.com/ethercreative/web-payments/blob/master/src/widgets/Comparison.php#L122.

In case there are no commerce orders yet, the widget should show a warning or 0%.