From ffef8333636fe6143aa675534f6ce7852199be20 Mon Sep 17 00:00:00 2001 From: JoelHMikael Date: Mon, 6 Dec 2021 14:06:31 +0200 Subject: Fixed a minor bug in buildMain in server.js --- server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server.js') diff --git a/server.js b/server.js index 591aeaf..86ed81e 100644 --- a/server.js +++ b/server.js @@ -72,7 +72,10 @@ function openFile(path) async function buildMain(args) { const path = args["path"]; - const index = args["query"].index.toUpperCase().replaceAll(".", "").replaceAll(" ", ""); + const query = args["query"]; + let index; + if (typeof query.index === "string") + index = query.index.toUpperCase().replaceAll(".", "").replaceAll(" ", ""); const shifts = args["shifts"]; const DB = args["db"]; -- cgit v1.2.3