fix(plugin-workflow): fix todo drawer data load (#1656)
This commit is contained in:
		
							parent
							
								
									28ee5d1477
								
							
						
					
					
						commit
						0ecbd715a6
					
				@ -379,15 +379,15 @@ function useFlowRecordFromBlock(opts) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function FlowContextProvider(props) {
 | 
					function FlowContextProvider(props) {
 | 
				
			||||||
  const api = useAPIClient();
 | 
					  const api = useAPIClient();
 | 
				
			||||||
  const { id, node, executionId } = useRecord();
 | 
					  const { id, node } = useRecord();
 | 
				
			||||||
  const [flowContext, setFlowContext] = useState<any>(null);
 | 
					  const [flowContext, setFlowContext] = useState<any>(null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  useEffect(() => {
 | 
					  useEffect(() => {
 | 
				
			||||||
    if (!executionId) {
 | 
					    if (!id) {
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    api.resource('users_jobs').get?.({
 | 
					    api.resource('users_jobs').get?.({
 | 
				
			||||||
      filterByTk: executionId,
 | 
					      filterByTk: id,
 | 
				
			||||||
      appends: ['workflow', 'workflow.nodes', 'execution', 'execution.jobs'],
 | 
					      appends: ['workflow', 'workflow.nodes', 'execution', 'execution.jobs'],
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
      .then(({ data }) => {
 | 
					      .then(({ data }) => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user