Skip to content

Commit a732456

Browse files
fix: nullsafe access
1 parent 55b37ea commit a732456

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/parse-dining.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function isMenuSheet(menu: xl.Worksheet): boolean {
2525
const [day, date] = [menu.getCell(1 + rowOffset, 1), menu.getCell(2 + rowOffset, 1)]
2626
const [bfast, lunch, snacks, dinner] = [menu.getCell(3 + rowOffset, 1), menu.getCell(19 + rowOffset, 1), menu.getCell(32 + rowOffset, 1), menu.getCell(37 + rowOffset, 1)]
2727

28-
if (day.value.toString().trim() != "DAY" || date.value.toString().trim() != "DATE") {
28+
if (day.value?.toString().trim() != "DAY" || date.value?.toString().trim() != "DATE") {
2929
if (rowOffset > 3) return false;
3030

3131
console.log("increased row offset");

0 commit comments

Comments
 (0)