From 076f3e63107fac1a9f4da705dfd18b428cb1340c Mon Sep 17 00:00:00 2001 From: karrycharon Date: Fri, 15 Sep 2023 16:37:58 +0800 Subject: [PATCH] fix structuredClone undefined error; --- web/scripts/app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/scripts/app.js b/web/scripts/app.js index 6dd1f3ed..4beaf03a 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; }