Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

tweak(platform): Updated onOpenChange code style (#8187)

Swiftybeedc4b9714c
diff --git a/autogpt_platform/frontend/src/components/edit/control/BlocksControl.tsx b/autogpt_platform/frontend/src/components/edit/control/BlocksControl.tsx
index e09017fefd..cfea589964 100644
--- a/autogpt_platform/frontend/src/components/edit/control/BlocksControl.tsx
+++ b/autogpt_platform/frontend/src/components/edit/control/BlocksControl.tsx
@@ -77,11 +77,7 @@ export const BlocksControl: React.FC<BlocksControlProps> = ({
return (
<Popover
open={pinBlocksPopover ? true : undefined}
- onOpenChange={(open) => {
- if (!open) {
- resetFilters();
- }
- }}
+ onOpenChange={(open) => open || resetFilters()}
>
<Tooltip delayDuration={500}>
<TooltipTrigger asChild>