diff --git a/frontend/client-portal/src/sections/dashboard/CardPolicy.tsx b/frontend/client-portal/src/sections/dashboard/CardPolicy.tsx index 2fa94b92..41ba3808 100644 --- a/frontend/client-portal/src/sections/dashboard/CardPolicy.tsx +++ b/frontend/client-portal/src/sections/dashboard/CardPolicy.tsx @@ -95,9 +95,10 @@ export default function CardPolicy(props: CardPolicyProps) { const [dialogTitle, setDialogTitle] = useState(''); const [isDialog, setIsDialog] = useState(''); - const { limit, topUpLimit } = props.data; - - console.log(limit); + const { limit, topUpLimit } = props.data || {}; + if (!limit || !topUpLimit) { + return null; + } const clickHandler = (isDialog: string) => { switch (isDialog) {