diff --git a/ExtrasNode/js/extras_node.js b/ExtrasNode/js/extras_node.js index e84d060..6a3838d 100644 --- a/ExtrasNode/js/extras_node.js +++ b/ExtrasNode/js/extras_node.js @@ -174,12 +174,14 @@ app.registerExtension({ this.root.preview_content_combo = preview_content_combo; } - const closeAllContextMenus = LiteGraph.closeAllContextMenus; + const originalCloseAllContextMenus = LiteGraph.closeAllContextMenus; LiteGraph.closeAllContextMenus = function () { - closeAllContextMenus?.apply(this, arguments); + originalCloseAllContextMenus?.apply(this, arguments); - if (document.querySelector(".preview_content_combo")) - document.querySelector(".preview_content_combo").remove(); + const previewCombo = document.querySelector(".preview_content_combo"); + if (previewCombo) { + previewCombo.remove(); + } }; const closeItem = LiteGraph.ContextMenu.prototype.close; diff --git a/pyproject.toml b/pyproject.toml index 289e65a..8adf1ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui_custom_nodes_alekpet" description = "Nodes: PoseNode, PainterNode, TranslateTextNode, TranslateCLIPTextEncodeNode, DeepTranslatorTextNode, DeepTranslatorCLIPTextEncodeNode, ArgosTranslateTextNode, ArgosTranslateCLIPTextEncodeNode, ChatGLM4TranslateCLIPTextEncodeNode, ChatGLM4TranslateTextNode, ChatGLM4InstructNode, ChatGLM4InstructMediaNode, PreviewTextNode, HexToHueNode, ColorsCorrectNode, IDENode." -version = "1.0.41" +version = "1.0.42" license = { file = "LICENSE" } [project.urls]