From e3b8926aefd429e884fdc5b863e3f3fbfd0b843d Mon Sep 17 00:00:00 2001 From: twwu Date: Wed, 20 Nov 2024 15:30:57 +0800 Subject: [PATCH] fix: correct fetched releases variable in version check and update dev script for debugging --- web/app/components/plugins/plugin-item/action.tsx | 2 +- web/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/components/plugins/plugin-item/action.tsx b/web/app/components/plugins/plugin-item/action.tsx index a387727b4f..1bc34c9928 100644 --- a/web/app/components/plugins/plugin-item/action.tsx +++ b/web/app/components/plugins/plugin-item/action.tsx @@ -55,7 +55,7 @@ const Action: FC = ({ const handleFetchNewVersion = async () => { const fetchedReleases = await fetchReleases(author, pluginName) - if (fetchReleases.length === 0) return + if (fetchedReleases.length === 0) return const { needUpdate, toastProps } = checkForUpdates(fetchedReleases, meta!.version) Toast.notify(toastProps) if (needUpdate) { diff --git a/web/package.json b/web/package.json index 2d415f7f10..0c0317b803 100644 --- a/web/package.json +++ b/web/package.json @@ -6,7 +6,7 @@ "node": ">=18.17.0" }, "scripts": { - "dev": "next dev", + "dev": "NODE_OPTIONS='--inspect' next dev", "build": "next build", "start": "cp -r .next/static .next/standalone/.next/static && cp -r public .next/standalone/public && cross-env PORT=$npm_config_port HOSTNAME=$npm_config_host node .next/standalone/server.js", "lint": "next lint", @@ -190,4 +190,4 @@ "eslint --fix" ] } -} +} \ No newline at end of file