From 6f61688bd827c9e7abdb2e1f3ae34bb2ed0ce16e Mon Sep 17 00:00:00 2001 From: hayden Date: Wed, 18 Sep 2024 15:20:13 +0800 Subject: [PATCH] Fix the problem that the CSS reference address may be wrong. --- web/model-manager.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/model-manager.js b/web/model-manager.js index 12b9b2c..fd55c67 100644 --- a/web/model-manager.js +++ b/web/model-manager.js @@ -1426,9 +1426,9 @@ class DirectoryDropdown { const selection = options[iSelection]; if (selection !== undefined && selection !== null) { DirectoryDropdown.selectionToInput( - input, - selection, - modelData.searchSeparator, + input, + selection, + modelData.searchSeparator, DROPDOWN_DIRECTORY_SELECTION_KEY_CLASS ); const path = this.#updateOptions(); @@ -5514,10 +5514,12 @@ app.registerExtension({ name: 'Comfy.ModelManager', init() {}, async setup() { + const cssFileUrl = new URL(import.meta.url).pathname.replace('.js', '.css'); + $el('link', { parent: document.head, rel: 'stylesheet', - href: './extensions/ComfyUI-Model-Manager/model-manager.css', + href: cssFileUrl, }); app.ui?.menuContainer?.appendChild(