diff --git a/src/app/api/cal/route.js b/src/app/api/cal/route.js index 03c9411..fb99c23 100644 --- a/src/app/api/cal/route.js +++ b/src/app/api/cal/route.js @@ -27,7 +27,9 @@ export async function GET(request) { let dotw = []; if (thing.dotw) { for (const dow of thing.dotw) { - dotw.push(days.indexOf(dow)); + if (days.includes(dow)) { + dotw.push(days.indexOf(dow)); + } } }