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;
|
const rawJSON = reader.result;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const parsedJSON = JSON.parse(String(rawJSON));
|
dispatch(workflowLoadRequested({ data: { workflow: String(rawJSON), graph: null }, asCopy: true }));
|
||||||
dispatch(workflowLoadRequested({ workflow: parsedJSON, asCopy: true }));
|
|
||||||
dispatch(workflowLoadedFromFile());
|
dispatch(workflowLoadedFromFile());
|
||||||
onSuccess && onSuccess();
|
onSuccess && onSuccess();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user