From adad6dca7225a2ae955f00251231acc248d58e48 Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Fri, 31 Oct 2025 12:56:26 +1000 Subject: [PATCH] Update apps/studio/state/sidebar-manager-state.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- apps/studio/state/sidebar-manager-state.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/studio/state/sidebar-manager-state.tsx b/apps/studio/state/sidebar-manager-state.tsx index 7c7b6aac006..bf9db32320a 100644 --- a/apps/studio/state/sidebar-manager-state.tsx +++ b/apps/studio/state/sidebar-manager-state.tsx @@ -154,9 +154,10 @@ export const useRegisterSidebar = ( const { sidebars, registerSidebar, unregisterSidebar } = useSidebarManagerSnapshot() useEffect(() => { - if (!sidebars[id] && enabled) { + const isEnabled = enabled !== false; + if (!sidebars[id] && isEnabled) { registerSidebar(id, component, handlers) - } else if (sidebars[id] && !enabled) { + } else if (sidebars[id] && !isEnabled) { unregisterSidebar(id) }