Skip to content

Commit

Permalink
Defaulted context to empty object if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
khomyakov committed Jan 2, 2024
1 parent 80aac1a commit d39341b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Breakdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Breakdown.Item = BreakdownItem;
Breakdown.Item.displayName = "Breakdown.Item";

const BreakdownSubtotalItem = ({ children, info, value, className, color = "black", ...rest }) => {
const { currency, locale } = useContext(CurrencyContext);
const { currency, locale } = useContext(CurrencyContext) ?? {};

return (
<tr className={clsx("ui-breakdown-subtotal-item", "font-bold", colors[color], className)} {...rest}>
Expand Down

0 comments on commit d39341b

Please sign in to comment.