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: avoid passing empty uniqueIdentifier to InstallFromMarketplace (#27802)

johnny0120744b287e6744
diff --git a/web/app/components/plugins/plugin-page/index.tsx b/web/app/components/plugins/plugin-page/index.tsx
index d326fdf6e42..4b8444ab345 100644
--- a/web/app/components/plugins/plugin-page/index.tsx
+++ b/web/app/components/plugins/plugin-page/index.tsx
@@ -72,6 +72,8 @@ const PluginPage = ({
}
}, [searchParams])
+ const [uniqueIdentifier, setUniqueIdentifier] = useState<string | null>(null)
+
const [dependencies, setDependencies] = useState<Dependency[]>([])
const bundleInfo = useMemo(() => {
const info = searchParams.get(BUNDLE_INFO_KEY)
@@ -99,6 +101,7 @@ const PluginPage = ({
useEffect(() => {
(async () => {
+ setUniqueIdentifier(null)
await sleep(100)
if (packageId) {
const { data } = await fetchManifestFromMarketPlace(encodeURIComponent(packageId))
@@ -108,6 +111,7 @@ const PluginPage = ({
version: version.version,
icon: `${MARKETPLACE_API_PREFIX}/plugins/${plugin.org}/${plugin.name}/icon`,
})
+ setUniqueIdentifier(packageId)
showInstallFromMarketplace()
return
}
@@ -283,10 +287,10 @@ const PluginPage = ({
)}
{
- isShowInstallFromMarketplace && (
+ isShowInstallFromMarketplace && uniqueIdentifier && (
<InstallFromMarketplace
manifest={manifest! as PluginManifestInMarket}
- uniqueIdentifier={packageId}
+ uniqueIdentifier={uniqueIdentifier}
isBundle={!!bundleInfo}
dependencies={dependencies}
onClose={hideInstallFromMarketplace}