From b5fa40026b22f943183d6fd8ab933f4e3921e488 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Wed, 28 Sep 2022 19:37:15 -0400 Subject: [PATCH] fix(app/metrics): irrevelant warnings for `embed` function --- source/app/metrics/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app/metrics/index.mjs b/source/app/metrics/index.mjs index c4aba2994c3..33d991af829 100644 --- a/source/app/metrics/index.mjs +++ b/source/app/metrics/index.mjs @@ -143,7 +143,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf, const warnings = [] if ((!Object.keys(Plugins).filter(key => q[key]).length) && (!parts.length)) warnings.push({warning: {message: "No plugin were selected"}}) - const ineffective = Object.keys(q).filter(key => (key.includes(".")) && (key.split(".").at(0) !== "base") && (key.split(".").at(0) in Plugins)).filter(key => !q[key.split(".").at(0)]) + const ineffective = Object.keys(q).filter(key => (key.includes(".")) && (key.split(".").at(0) !== "base") && (!(key in imports.metadata.plugins.base.inputs)) && (key.split(".").at(0) in Plugins)).filter(key => !q[key.split(".").at(0)]) warnings.push(...ineffective.map(key => ({warning: {message: `"${key}" has no effect because "${key.split(".").at(0)}: true" is not set`}}))) //Compute rendering const {rendered} = await metrics({login, q}, {...arguments[1], convert: ["svg", "png", "jpeg"].includes(q["config.output"]) ? q["config.output"] : null, warnings}, arguments[2])