Skip to content

Commit

Permalink
Update route.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahuletto authored Jan 23, 2025
1 parent c07204e commit d49995c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/timetable/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function POST(req: Request) {
const timetable = json.timetable.schedule;

const ophours = json.ophour?.split(",");
if (ophours) {
if (ophours?.[0]) {
for (const ophour of ophours) {
const [day, hour] = ophour.split("-");
const dayIndex = Number.parseInt(day.replace("D", "")) - 1;
Expand Down

0 comments on commit d49995c

Please sign in to comment.