Fix deprecated ui.js import in comfyui-share-copus.js

This commit is contained in:
TokenSpender
2026-05-03 07:09:31 -04:00
committed by GitHub
parent 4a84ec185b
commit 91bfd8e6d3
+8 -1
View File
@@ -1,7 +1,14 @@
import { app } from "../../scripts/app.js";
import { $el, ComfyDialog } from "../../scripts/ui.js";
import { customAlert } from "./common.js";
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
let $el, ComfyDialog;
if (window?.comfyAPI?.ui) {
({ $el, ComfyDialog } = window.comfyAPI.ui);
} else {
({ $el, ComfyDialog } = await import("../../scripts/ui.js"));
}
const env = "prod";
let DEFAULT_HOMEPAGE_URL = "https://copus.io";