From 336a945ff8637192a8c2a913e4e85150b9490f11 Mon Sep 17 00:00:00 2001 From: TokenSpender Date: Sun, 3 May 2026 07:08:24 -0400 Subject: [PATCH] Fix deprecated ui.js import in comfyui-gui-builder.js --- js/comfyui-gui-builder.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/comfyui-gui-builder.js b/js/comfyui-gui-builder.js index e6de81c6..c9da77a1 100644 --- a/js/comfyui-gui-builder.js +++ b/js/comfyui-gui-builder.js @@ -1,4 +1,9 @@ -import { $el } from "../../scripts/ui.js"; +// === SHIM FOR NEW COMFYUI (removes ui.js warning) === +let $el; +if (window?.comfyAPI?.ui) { + ({ $el } = window.comfyAPI.ui); +} else { + ({ $el } = await import("../../scripts/ui.js")); function normalizeContent(content) { const tmp = document.createElement('div'); @@ -224,4 +229,4 @@ export function buildGuiFrameCustomHeader(dialogId, customHeader, content, owner }); return dialog_mask; -} \ No newline at end of file +}