From d696cfc1a386f0d6b43ec6e9212c9aa2f35c68ac Mon Sep 17 00:00:00 2001 From: johnny0120 Date: Wed, 5 Nov 2025 10:22:22 +0800 Subject: [PATCH] fix: avoid passing empty uniqueIdentifier to InstallFromMarketplace (#27802) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- web/app/components/plugins/plugin-page/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/app/components/plugins/plugin-page/index.tsx b/web/app/components/plugins/plugin-page/index.tsx index d326fdf6e4..4b8444ab34 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(null) + const [dependencies, setDependencies] = useState([]) 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 && (