From 3034de4523c6a1e9864073618d5c2955f21c86ec Mon Sep 17 00:00:00 2001 From: imba97 Date: Thu, 14 Nov 2024 23:43:32 +0800 Subject: [PATCH] fix: search plugin issue --- src/utils.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 3f9cb7e..234f952 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -70,13 +70,13 @@ export async function searchPlugin(pluginNames: string[]): Promise try { const json = JSON.parse(result.content) - if (finedNames.includes(json.name)) { - continue - } + json.forEach((plugin: Record) => { + if (finedNames.includes(plugin.name)) { + return + } - finedNames.push(json.name) + finedNames.push(plugin.name) - json.forEach((plugin: Record) => { plugins.push({ name: plugin.name, version: plugin.version,