From f201792193536ad7a06d3b2f62da9bab94ec1597 Mon Sep 17 00:00:00 2001 From: tycrek Date: Sun, 3 Oct 2021 20:19:11 -0600 Subject: [PATCH] Fixed incorrect path check for custom index --- src/ass.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ass.ts b/src/ass.ts index 8272b68..6b5e530 100644 --- a/src/ass.ts +++ b/src/ass.ts @@ -69,7 +69,7 @@ useSsl && app.use(helmet.hsts({ preload: true })); // skipcq: JS-0093 app.use(nofavicon); // Use custom index, otherwise render README.md -const ASS_INDEX = indexFile !== '' && fs.existsSync(`../${indexFile}`) && require(`../${indexFile}`); +const ASS_INDEX = indexFile !== '' && fs.existsSync(path(`${indexFile}`)) && require(`../${indexFile}`); const ASS_INDEX_ENABLED = typeof ASS_INDEX === typeof Function; app.get('/', (req, res, next) => ASS_INDEX_ENABLED // skipcq: JS-0229 ? ASS_INDEX(req, res, next)