Fix "base" parameter for Action which defaults to everything enabled

This commit is contained in:
lowlighter
2020-12-08 13:12:48 +01:00
parent 6801f069e2
commit 47f0f6d94b
2 changed files with 6 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@@ -26,10 +26,11 @@
const data = {base:{}}
//Base parts
if (("base" in q)&&(!q.base))
conf.settings.plugins.base.parts.map(part => !(`base.${part}` in q) ? q[`base.${part}`] = false : false)
{
const defaulted = ("base" in q) ? !!q.base : true
for (const part of conf.settings.plugins.base.parts)
data.base[part] = !!(q[`base.${part}`] ?? true)
data.base[part] = `base.${part}` in q ? !!q[ `base.${part}`] : defaulted
}
//Placeholder
if (login === "placeholder")