fix(plugin-workflow): fix todo drawer data load (#1656)

This commit is contained in:
Junyi 2023-04-06 19:07:38 +07:00 committed by GitHub
parent 28ee5d1477
commit 0ecbd715a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -379,15 +379,15 @@ function useFlowRecordFromBlock(opts) {
function FlowContextProvider(props) {
const api = useAPIClient();
const { id, node, executionId } = useRecord();
const { id, node } = useRecord();
const [flowContext, setFlowContext] = useState<any>(null);
useEffect(() => {
if (!executionId) {
if (!id) {
return;
}
api.resource('users_jobs').get?.({
filterByTk: executionId,
filterByTk: id,
appends: ['workflow', 'workflow.nodes', 'execution', 'execution.jobs'],
})
.then(({ data }) => {