fix: update fetchReleases to use owner and repo from meta (#12590)

This commit is contained in:
Hiroshi Fujita 2025-01-10 16:46:10 +09:00 committed by GitHub
parent f69220ca96
commit 04dade2f9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)