Fix deprecated ui.js import in comfyui-gui-builder.js

This commit is contained in:
TokenSpender 2026-05-03 07:08:24 -04:00 committed by GitHub
parent 8d5c12037f
commit 336a945ff8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}
}