Skip to content

Commit 69979ba

Browse files
committed
fix(sidebar): preserve cookie whitespace matching
1 parent 4d2e959 commit 69979ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/sim/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
119119
// Collapse comes from the cookie (independent of localStorage
120120
// parsing); the persisted width is read defensively below. Match the
121121
// value strictly so 'sidebar_collapsed=10' isn't read as collapsed.
122-
var cookieMatch = document.cookie.match(/(?:^|;s*)sidebar_collapsed=([^;]*)/);
122+
var cookieMatch = document.cookie.match(/(?:^|;\\s*)sidebar_collapsed=([^;]*)/);
123123
var hasCookie = cookieMatch !== null;
124124
var collapsed = cookieMatch !== null && cookieMatch[1] === '1';
125125

0 commit comments

Comments
 (0)