From 03c8d55ab9d9d8718794e64d902099aa66b6e7ae Mon Sep 17 00:00:00 2001 From: Dispatcharr Date: Wed, 25 Feb 2026 08:32:40 -0600 Subject: [PATCH] Fix legacy plugin actions missing events Treat action.events as optional ([] by default) and guard UI rendering so Plugin cards no longer crash. --- frontend/src/components/cards/PluginCard.jsx | 71 +++++++++++--------- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/frontend/src/components/cards/PluginCard.jsx b/frontend/src/components/cards/PluginCard.jsx index b8e69af0..81d1148b 100644 --- a/frontend/src/components/cards/PluginCard.jsx +++ b/frontend/src/components/cards/PluginCard.jsx @@ -37,38 +37,45 @@ const PluginActionList = ({ runningActionId, handlePluginRun, }) => { - return plugin.actions.map((action) => ( - -
- {action.label} - {action.description && ( - - {action.description} - - )} - - Event Triggers - - {action.events.map((event) => ( - - {SUBSCRIPTION_EVENTS[event] || event} - - ))} -
- -
- )); + return plugin.actions.map((action) => { + const events = Array.isArray(action?.events) ? action.events : []; + return ( + +
+ {action.label} + {action.description && ( + + {action.description} + + )} + {events.length > 0 && ( + <> + + Event Triggers + + {events.map((event) => ( + + {SUBSCRIPTION_EVENTS[event] || event} + + ))} + + )} +
+ +
+ ); + }); }; const PluginActionStatus = ({ running, lastResult }) => {