Skip to content

Commit

Permalink
fix: nav jumping around if no nav preferences are set (#9301)
Browse files Browse the repository at this point in the history
If you start a fresh dev server and open payload, the nav will initially
show as closed and then jump to its open state. This is because no
preferences are set, so the server tells the client to initially keep it
closed, despite the default nav state being _open_.
  • Loading branch information
AlessioGr authored Nov 18, 2024
1 parent 58ac784 commit 0a6f530
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/layouts/Root/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const RootLayout = async ({
config={clientConfig}
dateFNSKey={i18n.dateFNSKey}
fallbackLang={config.i18n.fallbackLanguage}
isNavOpen={navPrefs?.open}
isNavOpen={navPrefs?.open ?? true}
languageCode={languageCode}
languageOptions={languageOptions}
permissions={permissions}
Expand Down

0 comments on commit 0a6f530

Please sign in to comment.