fix: when error can not install

This commit is contained in:
Joel
2024-11-19 17:29:02 +08:00
parent a093a48675
commit e151c2ee8c
2 changed files with 9 additions and 5 deletions

View File

@ -30,8 +30,12 @@ const InstallByDSLList: FC<Props> = ({
return []
const _plugins = allPlugins.map((d) => {
if (d.type === 'package')
return (d as any).value.manifest
if (d.type === 'package') {
return {
...(d as any).value.manifest,
plugin_id: (d as any).value.unique_identifier,
}
}
return undefined
})
@ -84,7 +88,7 @@ const InstallByDSLList: FC<Props> = ({
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isFetchingMarketplaceData])
const isLoadedAllData = allPlugins.length === plugins.length && plugins.every(p => !!p)
const isLoadedAllData = (plugins.filter(p => !!p).length + errorIndexes.length) === allPlugins.length
useEffect(() => {
if (isLoadedAllData)
onLoadedAllPlugin()