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

pull/12613/head
Hiroshi Fujita 1 year ago committed by GitHub
parent f69220ca96
commit 04dade2f9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save