fix structuredClone undefined error;

This commit is contained in:
karrycharon 2023-09-15 16:37:58 +08:00
parent 0d8f376446
commit 076f3e6310
1 changed files with 7 additions and 1 deletions

View File

@ -1297,7 +1297,13 @@ export class ComfyApp {
let reset_invalid_values = false;
if (!graphData) {
graphData = structuredClone(defaultGraph);
if (typeof structuredClone === "undefined")
{
graphData = JSON.parse(JSON.stringify(defaultGraph));
}else
{
graphData = structuredClone(defaultGraph);
}
reset_invalid_values = true;
}