From 0515eee3b17841a7b9460d7f25abbb74582531e6 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Mon, 25 Sep 2023 19:25:22 +0200 Subject: [PATCH] Fix incorrect Update button in web version (#3885) --- src/components/left/main/LeftMain.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/left/main/LeftMain.tsx b/src/components/left/main/LeftMain.tsx index dd734996b..353d5ff58 100644 --- a/src/components/left/main/LeftMain.tsx +++ b/src/components/left/main/LeftMain.tsx @@ -10,7 +10,7 @@ import { LeftColumnContent } from '../../../types'; import { PRODUCTION_URL } from '../../../config'; import buildClassName from '../../../util/buildClassName'; -import { IS_TOUCH_ENV } from '../../../util/windowEnvironment'; +import { IS_ELECTRON, IS_TOUCH_ENV } from '../../../util/windowEnvironment'; import useForumPanelRender from '../../../hooks/useForumPanelRender'; import useLang from '../../../hooks/useLang'; @@ -127,7 +127,7 @@ const LeftMain: FC = ({ }); const handleUpdateClick = useLastCallback(() => { - if (!isElectronAutoUpdateEnabled) { + if (IS_ELECTRON && !isElectronAutoUpdateEnabled) { window.open(`${PRODUCTION_URL}/get`, '_blank', 'noopener'); } else if (isElectronUpdateAvailable) { window.electron?.installUpdate(); @@ -223,7 +223,6 @@ const LeftMain: FC = ({