fix: update fetchReleases to use owner and repo from meta (#12590)
This commit is contained in:
parent
f69220ca96
commit
04dade2f9b
@ -54,7 +54,9 @@ const Action: FC<Props> = ({
|
|||||||
const invalidateInstalledPluginList = useInvalidateInstalledPluginList()
|
const invalidateInstalledPluginList = useInvalidateInstalledPluginList()
|
||||||
|
|
||||||
const handleFetchNewVersion = async () => {
|
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
|
if (fetchedReleases.length === 0) return
|
||||||
const { needUpdate, toastProps } = checkForUpdates(fetchedReleases, meta!.version)
|
const { needUpdate, toastProps } = checkForUpdates(fetchedReleases, meta!.version)
|
||||||
Toast.notify(toastProps)
|
Toast.notify(toastProps)
|
||||||
|
Loading…
Reference in New Issue
Block a user