Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

fix structuredClone undefined error;

karrycharon076f3e63107f
diff --git a/web/scripts/app.js b/web/scripts/app.js
index 6dd1f3edd..4beaf03ae 100644
--- a/web/scripts/app.js
+++ b/web/scripts/app.js
@@ -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;
}