From 45a573dec08d9a839023f97cb89e924936d8bd48 Mon Sep 17 00:00:00 2001 From: tycrek Date: Thu, 26 Aug 2021 00:04:22 -0600 Subject: [PATCH] fixed blank index file bug --- ass.js | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ass.js b/ass.js index 7e89ad6..fcdbb18 100755 --- a/ass.js +++ b/ass.js @@ -70,7 +70,7 @@ useSsl && app.use(helmet.hsts({ preload: true })); // skipcq: JS-0093 app.use(nofavicon); // Use custom index, otherwise render README.md -const ASS_INDEX = fs.existsSync(`./${indexFile}/`) && require(`./${indexFile}`); +const ASS_INDEX = indexFile !== '' && fs.existsSync(`./${indexFile}/`) && require(`./${indexFile}`); app.get('/', (req, res, next) => ASS_INDEX // skipcq: JS-0229 ? ASS_INDEX(req, res, next) : fs.readFile(path('README.md')) diff --git a/package-lock.json b/package-lock.json index 9d3aa87..209ce91 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ass", - "version": "0.8.4", + "version": "0.8.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ass", - "version": "0.8.4", + "version": "0.8.5", "license": "ISC", "dependencies": { "@tycrek/ass-storage-engine": "^0.2.7", diff --git a/package.json b/package.json index ac7e186..ef2b8a2 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ass", - "version": "0.8.4", + "version": "0.8.5", "description": "The superior self-hosted ShareX server", "main": "ass.js", "engines": {