Always clone graph data when loading to fix some load issues.

This commit is contained in:
comfyanonymous 2023-11-15 15:55:02 -05:00
parent 629e4c552c
commit 7114cfec0e

View File

@ -1489,14 +1489,16 @@ export class ComfyApp {
let reset_invalid_values = false; let reset_invalid_values = false;
if (!graphData) { if (!graphData) {
graphData = defaultGraph;
reset_invalid_values = true;
}
if (typeof structuredClone === "undefined") if (typeof structuredClone === "undefined")
{ {
graphData = JSON.parse(JSON.stringify(defaultGraph)); graphData = JSON.parse(JSON.stringify(graphData));
}else }else
{ {
graphData = structuredClone(defaultGraph); graphData = structuredClone(graphData);
}
reset_invalid_values = true;
} }
const missingNodeTypes = []; const missingNodeTypes = [];