From 8ac16686c8e436502070f9066305c501f4088c9a Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sat, 15 Jan 2022 14:08:05 -0500 Subject: [PATCH] fix(plugins/starlists): split filtering [skip ci] --- source/plugins/starlists/index.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/plugins/starlists/index.mjs b/source/plugins/starlists/index.mjs index c4254b74..f33da2d8 100644 --- a/source/plugins/starlists/index.mjs +++ b/source/plugins/starlists/index.mjs @@ -26,7 +26,12 @@ export default async function({login, q, imports, data, account}, {enabled = fal repositories:[] })))) const count = lists.length - lists = lists.filter(({name}) => (name)&&((only.includes(name.toLocaleLowerCase()))||((!only.length)&&(!ignored.includes(name.toLocaleLowerCase()))))).slice(0, limit) + console.debug(`metrics/compute/${login}/plugins > starlists > found [${lists.map(({name}) => name)}]`) + lists = lists + .filter(({name}) => name) + .filter(({name}) => (!only.length)||(only.includes(name.toLocaleLowerCase())) + .filter(({name}) => !ignored.includes(name.toLocaleLowerCase()))) + .slice(0, limit) console.debug(`metrics/compute/${login}/plugins > starlists > extracted ${lists.length} lists`) //Fetch star list content