mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): loading workflows from file
This commit is contained in:
parent
799cf06d20
commit
386d552493
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user