fix(ui): loading workflows from file

This commit is contained in:
psychedelicious 2024-05-17 18:53:30 +10:00
parent 799cf06d20
commit 386d552493

View File

@ -29,8 +29,7 @@ export const useLoadWorkflowFromFile: UseLoadWorkflowFromFile = ({ resetRef, onS
const rawJSON = reader.result;
try {
const parsedJSON = JSON.parse(String(rawJSON));
dispatch(workflowLoadRequested({ workflow: parsedJSON, asCopy: true }));
dispatch(workflowLoadRequested({ data: { workflow: String(rawJSON), graph: null }, asCopy: true }));
dispatch(workflowLoadedFromFile());
onSuccess && onSuccess();
} catch (e) {