Skip to content

Commit 9ebd580

Browse files
committed
fix: cart 제품 수 가져오기에서 안전한 접근 방식 적용
1 parent c65e79b commit 9ebd580

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/pyconkr-2026/src/components/layout/CartBadgeButton

apps/pyconkr-2026/src/components/layout/CartBadgeButton/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const InnerCartBadgeButton: FC<InnerCartBadgeButtonPropType> = ({ loading, count
4242
const CartBadgeButtonContent: FC<CartBadgeButtonProps> = ({ onClose }) => {
4343
const shopAPIClient = useShopClient();
4444
const { data: cart } = useCart(shopAPIClient);
45-
return <InnerCartBadgeButton count={cart?.products.length} loading={false} onClose={onClose} />;
45+
return <InnerCartBadgeButton count={cart?.products?.length} loading={false} onClose={onClose} />;
4646
};
4747

4848
export const CartBadgeButton: FC<CartBadgeButtonProps> = ({ onClose }) => (

0 commit comments

Comments
 (0)