aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoelHMikael <joel.h.kronqvist@gmail.com>2021-12-06 14:06:31 +0200
committerJoelHMikael <joel.h.kronqvist@gmail.com>2021-12-06 14:06:31 +0200
commitffef8333636fe6143aa675534f6ce7852199be20 (patch)
treed14c6636bb82d4be1535bf1fd80aa566fc24ee49
parentf443956978103c1de16717a34f4dca4300a2d4fb (diff)
downloadLYLLRuoka-ffef8333636fe6143aa675534f6ce7852199be20.tar.gz
LYLLRuoka-ffef8333636fe6143aa675534f6ce7852199be20.zip
Fixed a minor bug in buildMain in 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"];