From 55fd484594a7cfca7716162be3b7e3c04551acae Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 5 May 2023 14:50:40 +0800 Subject: [PATCH] :rotating_light: --- app/src/config/bazaar.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.ts index 6a3788046..ee90c7278 100644 --- a/app/src/config/bazaar.ts +++ b/app/src/config/bazaar.ts @@ -16,7 +16,7 @@ export const bazaar = { element: undefined as Element, genHTML() { const localSort = window.siyuan.storage[Constants.LOCAL_BAZAAR]; - const loadingHTML = `
`; + const loadingHTML = `
`; return `
${window.siyuan.languages.downloaded}
@@ -172,7 +172,7 @@ export const bazaar = { repoHash: item.repoHash, downloaded: false, }; - const fundingKey = Object.keys(item.fundingUrl)[0]; + const fundingKey = item.fundingUrl ? Object.keys(item.fundingUrl)[0] : ""; return `
@@ -582,7 +582,7 @@ export const bazaar = { } else if (type === "plugin") { fetchPost("/api/bazaar/getBazaarPlugin", {}, response => { bazaar._onBazaar(response, "plugins", false); - bazaar._data.themes = response.data.packages; + bazaar._data.plugins = response.data.packages; }); } item.setAttribute("data-init", "true"); @@ -671,6 +671,8 @@ export const bazaar = { id = "#configBazaarIcon"; } else if (bazaarType === "widgets") { id = "#configBazaarWidget"; + } else if (bazaarType === "plugins") { + id = "#configBazaarPlugin"; } const element = bazaar.element.querySelector(id); if (response.code === 1) {