Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: compatible with emoji/object icons in plugin card icon resolver (#33732)

Will0166cbf122b1
diff --git a/web/app/components/plugins/utils.ts b/web/app/components/plugins/utils.ts
index 1cf6dead975..687e11360e1 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<Plugin, 'from' | 'name' | 'org' | 'type'>,
- 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