From 496c44e389bd5ceda03cfb6ff1db10d78fb8559b Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 21 Mar 2024 17:58:53 +0800 Subject: [PATCH] :art: One-click upgrade of downloaded marketplace packages https://github.com/siyuan-note/siyuan/issues/8390 --- kernel/model/bazzar.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/kernel/model/bazzar.go b/kernel/model/bazzar.go index 6ec935baf..ffe71755b 100644 --- a/kernel/model/bazzar.go +++ b/kernel/model/bazzar.go @@ -84,6 +84,26 @@ func UpdatedPackages(frontend string) (plugins []*bazaar.Plugin, widgets []*baza }() wg.Wait() + + if 1 > len(plugins) { + plugins = []*bazaar.Plugin{} + } + + if 1 > len(widgets) { + widgets = []*bazaar.Widget{} + } + + if 1 > len(icons) { + icons = []*bazaar.Icon{} + } + + if 1 > len(themes) { + themes = []*bazaar.Theme{} + } + + if 1 > len(templates) { + templates = []*bazaar.Template{} + } return }