From 960f946928d0d1b02bdb358f7d69259f272ace84 Mon Sep 17 00:00:00 2001 From: tycrek Date: Sun, 3 Oct 2021 20:25:46 -0600 Subject: [PATCH] Fixed incorrect path check for custom index (cherry picked from ts branch) --- ass.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ass.js b/ass.js index 9a4af69..1908d04 100755 --- a/ass.js +++ b/ass.js @@ -66,7 +66,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)