fix: Prevents undefined features flags on first render (#9374)

pull/9081/head^2
Omar López 2023-06-06 19:03:52 -07:00 committed by GitHub
parent bfb5a31032
commit 9af621294d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -26,6 +26,8 @@ export async function ssrInit(context: GetServerSidePropsContext) {
// always preload "viewer.public.i18n" // always preload "viewer.public.i18n"
await ssr.viewer.public.i18n.fetch(); await ssr.viewer.public.i18n.fetch();
// So feature flags are available on first render
await ssr.viewer.features.map.prefetch();
return ssr; return ssr;
} }