{item.doses.map((dose) => {
// If no takenBy, show single checkbox; otherwise show one per person
- const people = dose.takenBy.length > 0 ? dose.takenBy : [null];
+ const people = (dose.takenBy || []).length > 0 ? dose.takenBy : [null];
return (
@@ -1504,7 +1504,7 @@ function AppContent() {
todayMidnight.setHours(0, 0, 0, 0);
const isFutureDose = doseDate.getTime() > todayMidnight.getTime();
// If no takenBy, show single checkbox; otherwise show one per person
- const people = dose.takenBy.length > 0 ? dose.takenBy : [null];
+ const people = (dose.takenBy || []).length > 0 ? dose.takenBy : [null];
return (
{dose.timeStr}
@@ -2215,7 +2215,7 @@ function AppContent() {
{item.doses.map((dose) => {
// If no takenBy, show single checkbox; otherwise show one per person
- const people = dose.takenBy.length > 0 ? dose.takenBy : [null];
+ const people = (dose.takenBy || []).length > 0 ? dose.takenBy : [null];
return (