🚑 Set lesson of substitution to 0 if column empty

This commit is contained in:
2023-06-30 17:32:55 +02:00
parent f286741557
commit 5a4e84f3c7

View File

@ -89,7 +89,7 @@ export function parseSubstitutionPlan(html) {
});
// Split change if it spans over multiple lessons
const rawLesson = rowData.lesson;
const rawLesson = rowData.lesson || "0";
const fromToLessons = rawLesson.match(/\d+/g).map(Number);
const from = fromToLessons[0];
const to = fromToLessons[1] || fromToLessons[0];