fix: load package dsl error

This commit is contained in:
Joel
2024-11-20 14:27:46 +08:00
parent bb2914652a
commit 40d025052d
3 changed files with 26 additions and 22 deletions

View File

@ -5,6 +5,7 @@ import type { Plugin } from '../../../types'
import type { PackageDependency } from '../../../types'
import { pluginManifestToCardPluginProps } from '../../utils'
import LoadedItem from './loaded-item'
import LoadingError from '../../base/loading-error'
type Props = {
checked: boolean
@ -17,6 +18,9 @@ const PackageItem: FC<Props> = ({
checked,
onCheckedChange,
}) => {
if (!payload.value?.manifest)
return <LoadingError />
const plugin = pluginManifestToCardPluginProps(payload.value.manifest)
return (
<LoadedItem