provide refreshComboInNodes

refreshComboInNodes is now an invoked extension hook, so instead of hijacking app.refreshComboInNodes, you can just provide the method and reduce incompatibility issues.

(Discovered because I was doing the same thing in cg-controller, and our two hijacks weren't playing nicely!)
This commit is contained in:
chrisgoringe
2024-11-08 11:49:17 +11:00
committed by GitHub
parent d6657cc1f0
commit f0dd5a0ff8
+5 -4
View File
@@ -268,12 +268,13 @@ app.registerExtension({
parent: document.head,
});
},
async refreshComboInNodes() {
workflows.load()
},
async setup() {
workflows = new PysssssWorkflows();
app.refreshComboInNodes = function () {
workflows.load();
refreshComboInNodes.apply(this, arguments);
};
const comfyDefault = "[ComfyUI Default]";
const defaultWorkflow = app.ui.settings.addSetting({