From a760ac4091d400b2ae1f461550eed5004b444844 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Thu, 20 Oct 2022 19:46:26 +0300 Subject: Made vegetarian food empty when not found. Had become visible in commit 'Bug fixes & started setup.sh' --- dbparse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dbparse.js') diff --git a/dbparse.js b/dbparse.js index eddfdc8..a65add0 100644 --- a/dbparse.js +++ b/dbparse.js @@ -180,7 +180,7 @@ async function getRandomIndex(day, DB, depth=0) let indexes = await DB.execute("SELECT course, teacher, class FROM shifts WHERE day = ? ORDER BY RAND() LIMIT 1", [day]); - indexes = Object.values(indexes[0] || [null, null, null]); /// ERROR HERE!!! + indexes = Object.values(indexes[0] || [null, null, null]); let start = randInt(0, indexes.length); for (let test = 0; test < 3; test++) { -- cgit v1.2.3