Skip to content

Commit

Permalink
fix: update fetchReleases to use owner and repo from meta (#12590)
Browse files Browse the repository at this point in the history
  • Loading branch information
fujita-h authored Jan 10, 2025
1 parent f69220c commit 04dade2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/app/components/plugins/plugin-item/action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ const Action: FC<Props> = ({
const invalidateInstalledPluginList = useInvalidateInstalledPluginList()

const handleFetchNewVersion = async () => {
const fetchedReleases = await fetchReleases(author, pluginName)
const owner = meta!.repo.split('/')[0] || author
const repo = meta!.repo.split('/')[1] || pluginName
const fetchedReleases = await fetchReleases(owner, repo)
if (fetchedReleases.length === 0) return
const { needUpdate, toastProps } = checkForUpdates(fetchedReleases, meta!.version)
Toast.notify(toastProps)
Expand Down

0 comments on commit 04dade2

Please sign in to comment.