Make saved json more pretty.

This commit is contained in:
comfyanonymous 2023-03-20 02:23:47 -04:00
parent 840464af93
commit 46b674c9c2

View File

@ -310,7 +310,7 @@ export class ComfyUI {
$el("button", {
textContent: "Save",
onclick: () => {
const json = JSON.stringify(app.graph.serialize()); // convert the data to a JSON string
const json = JSON.stringify(app.graph.serialize(), null, 2); // convert the data to a JSON string
const blob = new Blob([json], { type: "application/json" });
const url = URL.createObjectURL(blob);
const a = $el("a", {