aboutsummaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js5
1 files changed, 4 insertions, 1 deletions
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"];