From 35ef874867ced8ac18a18b201a432459e93f54f6 Mon Sep 17 00:00:00 2001 From: Joel Date: Fri, 29 Nov 2024 10:56:58 +0800 Subject: [PATCH] fix: detect is same packege use uniqid --- .../install-from-local-package/steps/install.tsx | 4 ++-- .../install-plugin/install-from-marketplace/steps/install.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx b/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx index d37275f19a..1ae300ffa2 100644 --- a/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx +++ b/web/app/components/plugins/install-plugin/install-from-local-package/steps/install.tsx @@ -43,9 +43,9 @@ const Installed: FC = ({ const hasInstalled = !!installedVersion useEffect(() => { - if (hasInstalled && toInstallVersion === installedVersion) + if (hasInstalled && uniqueIdentifier === installedInfoPayload.uniqueIdentifier) onInstalled() - }, [hasInstalled, toInstallVersion, installedVersion]) + }, [hasInstalled]) const [isInstalling, setIsInstalling] = React.useState(false) const { mutateAsync: installPackageFromLocal } = useInstallPackageFromLocal() diff --git a/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx b/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx index 0b3728e2a1..914c241c99 100644 --- a/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx +++ b/web/app/components/plugins/install-plugin/install-from-marketplace/steps/install.tsx @@ -52,9 +52,9 @@ const Installed: FC = ({ } = checkTaskStatus() useEffect(() => { - if (hasInstalled && toInstallVersion === installedVersion) + if (hasInstalled && uniqueIdentifier === installedInfoPayload.uniqueIdentifier) onInstalled() - }, [hasInstalled, toInstallVersion, installedVersion]) + }, [hasInstalled]) const handleCancel = () => { stop()