From f0dd5a0ff83fe6f2e19e4669cc9de61ec9f0063a Mon Sep 17 00:00:00 2001 From: chrisgoringe Date: Fri, 8 Nov 2024 11:49:17 +1100 Subject: [PATCH] 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!) --- web/js/workflows.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/js/workflows.js b/web/js/workflows.js index b979f6e..0225260 100644 --- a/web/js/workflows.js +++ b/web/js/workflows.js @@ -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({