From d39341b9724e28c166f6177305a5ab4cce8972f8 Mon Sep 17 00:00:00 2001 From: Oleksandr Khomyakov <10237454+khomyakov@users.noreply.github.com> Date: Tue, 2 Jan 2024 15:32:54 +0200 Subject: [PATCH] Defaulted context to empty object if undefined --- src/components/Breakdown.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Breakdown.jsx b/src/components/Breakdown.jsx index 192dde07..e1ad4308 100644 --- a/src/components/Breakdown.jsx +++ b/src/components/Breakdown.jsx @@ -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 (