fix: the plugin order is not the same as passed to api in DSL (#20515)

This commit is contained in:
Joel 2025-05-30 18:13:00 +08:00 committed by GitHub
parent 92528360f9
commit e01d975b80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,7 +83,12 @@ const InstallByDSLList: FC<Props> = ({
useEffect(() => {
if (!isFetchingMarketplaceDataById && infoGetById?.data.plugins) {
const payloads = infoGetById?.data.plugins
const sortedList = allPlugins.filter(d => d.type === 'marketplace').map((d) => {
const p = d as GitHubItemAndMarketPlaceDependency
const id = p.value.marketplace_plugin_unique_identifier?.split(':')[0]
return infoGetById.data.plugins.find(item => item.plugin_id === id)!
})
const payloads = sortedList
const failedIndex: number[] = []
const nextPlugins = produce(pluginsRef.current, (draft) => {
marketPlaceInDSLIndex.forEach((index, i) => {