Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

pass updated breakpoint to stitches

Oleg Isonen4d7ffd4eb9d0
diff --git a/app/canvas/shared/breakpoints.ts b/app/canvas/shared/breakpoints.ts
index 0c05f3917f..a4443ede4e 100644
--- a/app/canvas/shared/breakpoints.ts
+++ b/app/canvas/shared/breakpoints.ts
@@ -44,10 +44,12 @@ const useBreakpointChange = () => {
if (foundBreakpoint) {
foundBreakpoint.label = breakpoint.label;
foundBreakpoint.minWidth = breakpoint.minWidth;
- return;
+ } else {
+ // Its a new breakpoint
+ breakpoints.push(breakpoint);
}
- // Its a new breakpoint
- breakpoints.push(breakpoint);
+
+ setBreakpoints(breakpoints);
});
}
);