From 0264d89d144047adfecc7265703f2c3cdb6251eb Mon Sep 17 00:00:00 2001 From: Junyi Date: Wed, 17 May 2023 13:24:50 +0700 Subject: [PATCH] fix(plugin-workflow): fix trigger title when workflow not loaded (#1875) --- packages/plugins/workflow/src/client/triggers/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/plugins/workflow/src/client/triggers/index.tsx b/packages/plugins/workflow/src/client/triggers/index.tsx index 8f8c6dbfb..d2444dd7a 100644 --- a/packages/plugins/workflow/src/client/triggers/index.tsx +++ b/packages/plugins/workflow/src/client/triggers/index.tsx @@ -143,7 +143,9 @@ export const TriggerConfig = () => { const [editingTitle, setEditingTitle] = useState(''); const [editingConfig, setEditingConfig] = useState(false); useEffect(() => { - setEditingTitle(workflow.title ?? typeTitle); + if (workflow) { + setEditingTitle(workflow.title ?? typeTitle); + } }, [workflow]); if (!workflow || !workflow.type) {