From 0166cbf122b12456775642b72fd406fc0987c79f Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 19 Mar 2026 14:06:55 +0800 Subject: [PATCH] fix: compatible with emoji/object icons in plugin card icon resolver (#33732) --- web/app/components/plugins/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/app/components/plugins/utils.ts b/web/app/components/plugins/utils.ts index 1cf6dead97..687e11360e 100644 --- a/web/app/components/plugins/utils.ts +++ b/web/app/components/plugins/utils.ts @@ -21,12 +21,15 @@ const hasUrlProtocol = (value: string) => /^[a-z][a-z\d+.-]*:/i.test(value) export const getPluginCardIconUrl = ( plugin: Pick, - icon: string | undefined, + icon: string | { content: string, background: string } | undefined, tenantId: string, ) => { if (!icon) return '' + if (typeof icon === 'object') + return icon + if (hasUrlProtocol(icon) || icon.startsWith('/')) return icon