From 0c7b18858726c4e5ebf2dfcbfbb0949adb6ac275 Mon Sep 17 00:00:00 2001 From: yusing Date: Sun, 2 Feb 2025 03:31:52 +0800 Subject: [PATCH] api: fix search icon returning null when no match --- internal/api/v1/list.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/api/v1/list.go b/internal/api/v1/list.go index a711022..2e861c1 100644 --- a/internal/api/v1/list.go +++ b/internal/api/v1/list.go @@ -71,6 +71,9 @@ func List(cfg config.ConfigInstance, w http.ResponseWriter, r *http.Request) { U.RespondError(w, err) return } + if icons == nil { + icons = []string{} + } U.RespondJSON(w, r, icons) case ListTasks: U.RespondJSON(w, r, task.DebugTaskList())