From da3dcb291b076e54cc304f717f90717fc884a082 Mon Sep 17 00:00:00 2001 From: Yassien W <11986226+YassienW@users.noreply.github.com> Date: Thu, 4 May 2023 12:50:40 +0300 Subject: [PATCH] Fix incorrect breakpoint calculation --- packages/core/src/breakpoints.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/breakpoints.ts b/packages/core/src/breakpoints.ts index a9a9d4bd..20914ea4 100644 --- a/packages/core/src/breakpoints.ts +++ b/packages/core/src/breakpoints.ts @@ -57,7 +57,7 @@ export function useThemeBreakpoint(theme: ITheme): string | null { return ( Object.keys(screns) .reverse() - .find((screen) => width !== null && width > screns[screen]) || null + .find((screen) => width !== null && width >= screns[screen]) || null ) }, [screns, width]) }