From c203414abc4b99144d6155bcd0f1cbee2f812b85 Mon Sep 17 00:00:00 2001 From: Nuked88 Date: Wed, 11 Sep 2024 19:33:36 +0200 Subject: [PATCH] fix px in sidebarWidth param --- app/js/sidebar_node.js | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/js/sidebar_node.js b/app/js/sidebar_node.js index cc7e724..d198fac 100644 --- a/app/js/sidebar_node.js +++ b/app/js/sidebar_node.js @@ -140,6 +140,12 @@ function saveSidebarPosition(sideb) { function restoreSidebarWidth() { + //if getVar("sidebarWidth") contains px remove it + if (getVar("sidebarWidth") && getVar("sidebarWidth").includes('px')) { + setVar("sidebarWidth", getVar("sidebarWidth").replace('px', '')); + } + + if (getVar("sidebarWidth") == null) { setVar("sidebarWidth", 400); diff --git a/pyproject.toml b/pyproject.toml index 55483d9..c39e94a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-n-sidebar" description = "A simple sidebar for ComfyUI." -version = "1.5.6" +version = "1.5.7" license = { file = "LICENSE" } [project.urls]