From de87263a5d52cde9da243827d4da3b08038d42a0 Mon Sep 17 00:00:00 2001 From: abearxiong Date: Fri, 20 Feb 2026 19:24:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E4=BF=A1=E6=81=AF=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=BB=E9=A2=98=E6=95=B0=E7=BB=84=E5=B9=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=BB=98=E8=AE=A4=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/repo/store/index.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/repo/store/index.ts b/src/app/repo/store/index.ts index 9fdcd7e..5bf6382 100644 --- a/src/app/repo/store/index.ts +++ b/src/app/repo/store/index.ts @@ -146,15 +146,18 @@ export const useRepoStore = create((set, get) => { }, updateRepoInfo: async (data) => { const repo = data.path!; - const topics = data.topics?.split?.(','); + let topics = data.topics?.split?.(','); + if (Array.isArray(topics)) { + topics = topics.map(t => t.trim()).filter(Boolean); + } if (topics?.length === 0) { - topics.push('') + topics.push('cnb-center') } const updateData = { description: data.description, license: data?.license as any, site: data.site, - topics: topics, + topics: topics } const res = await cnb.repo.updateRepoInfo(repo, updateData) if (res.code === 200) {