From 04140def7c463b5ad4791257564627d68ccab57f Mon Sep 17 00:00:00 2001 From: PiEgg Date: Mon, 2 Dec 2024 20:01:15 +0800 Subject: [PATCH] :bug: Fix: plugin list search bug ISSUES CLOSED: #1297 --- src/renderer/pages/Plugin.vue | 2 +- src/universal/types/types.d.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/renderer/pages/Plugin.vue b/src/renderer/pages/Plugin.vue index 50f93d75b..941b5b114 100644 --- a/src/renderer/pages/Plugin.vue +++ b/src/renderer/pages/Plugin.vue @@ -485,7 +485,7 @@ function handleSearchResult (item: INPMSearchResultObject) { return { name, fullName: item.package.name, - author: item.package.author.name, + author: item.package.maintainers[0]?.username || '', description: item.package.description, logo: `https://cdn.jsdelivr.net/npm/${item.package.name}/logo.png`, config: {}, diff --git a/src/universal/types/types.d.ts b/src/universal/types/types.d.ts index 85719c129..7927193a4 100644 --- a/src/universal/types/types.d.ts +++ b/src/universal/types/types.d.ts @@ -213,9 +213,10 @@ interface INPMSearchResultObject { version: string description: string keywords: string[] - author: { - name: string - } + maintainers: Array<{ + email: string + username: string + }> links: { npm: string homepage: string