From c2ce28d69b979b015a68ef6983671e66a64c8ad0 Mon Sep 17 00:00:00 2001 From: linguist <22963968+lowlighter@users.noreply.github.com> Date: Sun, 3 Jan 2021 00:24:35 +0100 Subject: [PATCH] Add missing check in web instance --- source/app/web/instance.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app/web/instance.mjs b/source/app/web/instance.mjs index fc49c7f2..03d9f3e5 100644 --- a/source/app/web/instance.mjs +++ b/source/app/web/instance.mjs @@ -68,7 +68,7 @@ //Base routes const limiter = ratelimit({max:debug ? Number.MAX_SAFE_INTEGER : 60, windowMs:60*1000}) const templates = Object.entries(Templates).map(([name]) => ({name, enabled:(conf.settings.templates.enabled.length ? conf.settings.templates.enabled.includes(name) : true) ?? false})) - const enabled = Object.entries(Plugins).map(([name]) => ({name, enabled:plugins[name].enabled ?? false})) + const enabled = Object.entries(Plugins).map(([name]) => ({name, enabled:plugins[name]?.enabled ?? false})) const actions = {flush:new Map()} app.get("/", limiter, (req, res) => res.sendFile(`${conf.statics}/index.html`)) app.get("/index.html", limiter, (req, res) => res.sendFile(`${conf.statics}/index.html`))