From dd32c632cdf5006796614386f1f6094bdfb9328a Mon Sep 17 00:00:00 2001 From: Mary Hipp Rogers Date: Thu, 4 Jan 2024 11:04:21 -0500 Subject: [PATCH] fix default panel width (#5403) * fix default panel width * lint --------- Co-authored-by: Mary Hipp --- invokeai/frontend/web/src/features/ui/hooks/usePanel.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts b/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts index 42ea90d0a6..7c27bfdf08 100644 --- a/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts +++ b/invokeai/frontend/web/src/features/ui/hooks/usePanel.ts @@ -125,9 +125,8 @@ export const usePanel = (arg: UsePanelOptions): UsePanelReturn => { _setMinSize(minSizePct); - const currentSize = panelHandleRef.current.getSize(); // Resize if the current size is smaller than the new min size - happens when the window is resized smaller - if (currentSize && currentSize < minSizePct) { + if (panelHandleRef.current.getSize() < minSizePct) { panelHandleRef.current.resize(minSizePct); } });