From 439aeaed3be7b2e158d6c647a8706aac92903ed0 Mon Sep 17 00:00:00 2001 From: TokenSpender Date: Sun, 3 May 2026 07:10:52 -0400 Subject: [PATCH] Fix deprecated ui.js import in custom-nodes-manager.js --- js/custom-nodes-manager.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/js/custom-nodes-manager.js b/js/custom-nodes-manager.js index 1fdb2e20..d815ed57 100644 --- a/js/custom-nodes-manager.js +++ b/js/custom-nodes-manager.js @@ -1,5 +1,4 @@ import { app } from "../../scripts/app.js"; -import { ComfyDialog, $el } from "../../scripts/ui.js"; import { api } from "../../scripts/api.js"; import { buildGuiFrameCustomHeader, createSettingsCombo } from "./comfyui-gui-builder.js"; @@ -14,6 +13,14 @@ import { // https://cenfun.github.io/turbogrid/api.html import TG from "./turbogrid.esm.js"; +// === SHIM FOR NEW COMFYUI (removes ui.js warning) === +let ComfyDialog, $el; +if (window?.comfyAPI?.ui) { + ({ ComfyDialog, $el } = window.comfyAPI.ui); +} else { + ({ ComfyDialog, $el } = await import("../../scripts/ui.js")); +} + loadCss("./custom-nodes-manager.css"); const gridId = "node"; @@ -2245,4 +2252,4 @@ export class CustomNodesManager { get isVisible() { return this.element?.style?.display !== "none"; } -} \ No newline at end of file +}