diff --git a/src/components/admin/plugins/plugin-card.tsx b/src/components/admin/plugins/plugin-card.tsx index 8c064f4..e472a66 100644 --- a/src/components/admin/plugins/plugin-card.tsx +++ b/src/components/admin/plugins/plugin-card.tsx @@ -69,7 +69,7 @@ export function PluginCard({
- {Object.keys(plugin.settingsSchema).length > 0 && ( + {Object.keys(plugin.settingsSchema ?? {}).length > 0 && (
- {Object.entries(plugin.settingsSchema).map(([key, schema]) => ( + {Object.entries(plugin.settingsSchema ?? {}).map(([key, schema]) => ( { - return plugin.dependents.map((depId) => { + return (plugin.dependents ?? []).map((depId) => { const dep = plugins.find((p) => p.id === depId) return dep?.displayName ?? depId }) } const handleToggle = async (plugin: Plugin) => { - if (plugin.enabled && plugin.dependents.length > 0) { + if (plugin.enabled && (plugin.dependents?.length ?? 0) > 0) { const dependentNames = findDependentNames(plugin) setDependencyWarning({ plugin, dependents: dependentNames }) return