mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-13 23:12:35 +08:00
fix boolean
This commit is contained in:
parent
da8fd3a10e
commit
4dd9b2b0fa
@ -933,6 +933,7 @@ export class ComfyApp {
|
|||||||
try {
|
try {
|
||||||
const json = localStorage.getItem("ctrlZ");
|
const json = localStorage.getItem("ctrlZ");
|
||||||
if (json) {
|
if (json) {
|
||||||
|
localStorage.setItem("ctrlZ", JSON.stringify(this.graph.serialize())); // to make sure the next ctrlZ undoes this one
|
||||||
const workflow = JSON.parse(json);
|
const workflow = JSON.parse(json);
|
||||||
self.loadGraphData(workflow, false);
|
self.loadGraphData(workflow, false);
|
||||||
}
|
}
|
||||||
@ -1319,7 +1320,7 @@ export class ComfyApp {
|
|||||||
const workflow = JSON.stringify(this.graph.serialize())
|
const workflow = JSON.stringify(this.graph.serialize())
|
||||||
if(previous_workflow !== workflow){
|
if(previous_workflow !== workflow){
|
||||||
if(!this.changing) localStorage.setItem("ctrlZ", previous_workflow); // Save workflow for loading at ctrl + Z
|
if(!this.changing) localStorage.setItem("ctrlZ", previous_workflow); // Save workflow for loading at ctrl + Z
|
||||||
this.changing = truep
|
this.changing = true
|
||||||
}else this.changing = false;
|
}else this.changing = false;
|
||||||
localStorage.setItem("workflow", workflow); // Save current workflow for loading at startup
|
localStorage.setItem("workflow", workflow); // Save current workflow for loading at startup
|
||||||
},1000);
|
},1000);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user