mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:38:13 +00:00
fix(plugin-workflow): fix occasional error on enter workflow page (#2086)
This commit is contained in:
parent
5672ffc9fa
commit
56e6d0c3b1
@ -141,6 +141,7 @@ export const TriggerConfig = () => {
|
||||
const { workflow, refresh } = useFlowContext();
|
||||
const [editingTitle, setEditingTitle] = useState<string>('');
|
||||
const [editingConfig, setEditingConfig] = useState(false);
|
||||
let typeTitle = '';
|
||||
useEffect(() => {
|
||||
if (workflow) {
|
||||
setEditingTitle(workflow.title ?? typeTitle);
|
||||
@ -151,7 +152,9 @@ export const TriggerConfig = () => {
|
||||
return null;
|
||||
}
|
||||
const { title, type, config, executed } = workflow;
|
||||
const { title: typeTitle, fieldset, scope, components } = triggers.get(type);
|
||||
const trigger = triggers.get(type);
|
||||
const { fieldset, scope, components } = trigger;
|
||||
typeTitle = trigger.title;
|
||||
const detailText = executed ? '{{t("View")}}' : '{{t("Configure")}}';
|
||||
const titleText = `${lang('Trigger')}: ${compile(typeTitle)}`;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user