diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index 5f9a17c6..274a8840 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -588,7 +588,7 @@ const Dashboard: React.FC = () => { console.log(percentageAttendance); const currentAttendance = percentageAttendance?.[todayDate]; // let currentPercentAttendance = 'N/A'; - const presentPercentage = parseFloat(currentAttendance.present_percentage); + const presentPercentage = parseFloat(currentAttendance?.present_percentage); // Determine the color based on presentPercentage value let pathColor; // Default color (green)