From 99e2eaa6eedfc46424aff1d12dce9974679f698a Mon Sep 17 00:00:00 2001 From: AkaraChen Date: Wed, 8 Jan 2025 10:03:00 +0800 Subject: [PATCH] fix: switch plugin version --- .../nodes/_base/components/switch-plugin-version.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/_base/components/switch-plugin-version.tsx b/web/app/components/workflow/nodes/_base/components/switch-plugin-version.tsx index e459a4b49e..c375d3198a 100644 --- a/web/app/components/workflow/nodes/_base/components/switch-plugin-version.tsx +++ b/web/app/components/workflow/nodes/_base/components/switch-plugin-version.tsx @@ -34,6 +34,11 @@ export const SwitchPluginVersion: FC = (props) => { pluginDetails.refetch() onChange?.(targetVersion!) }, [hideUpdateModal, onChange, pluginDetails, targetVersion]) + + const targetUniqueIdentifier = (() => { + if (!targetVersion || !pluginDetail) return uniqueIdentifier + return uniqueIdentifier.replaceAll(pluginDetail.version, targetVersion) + })() return
{isShowUpdateModal && pluginDetail && = (props) => { payload: pluginDetail.declaration, }, targetPackageInfo: { - id: uniqueIdentifier, + id: targetUniqueIdentifier, version: targetVersion!, }, }}