Skip to content

Commit c2a8561

Browse files
fixup! make site work with the Cloudflare OpenNext adapter
1 parent 8480c34 commit c2a8561

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

apps/site/components/withDownloadSection.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ import getDownloadSnippets from '@/next-data/downloadSnippets';
77
import getReleaseData from '@/next-data/releaseData';
88
import { defaultLocale } from '@/next.locales.mjs';
99
import { ReleaseProvider, ReleasesProvider } from '@/providers/releaseProvider';
10-
import type { DownloadSnippet } from '@/types';
1110

1211
// By default the translated languages do not contain all the download snippets
1312
// Hence we always merge any translated snippet with the fallbacks for missing snippets
14-
let fallbackSnippets: Array<DownloadSnippet>;
13+
const fallbackSnippets = await getDownloadSnippets(defaultLocale.code);
1514

1615
const WithDownloadSection: FC<PropsWithChildren> = async ({ children }) => {
17-
fallbackSnippets ??= await getDownloadSnippets(defaultLocale.code);
18-
1916
const locale = await getLocale();
2017
const releases = await getReleaseData();
2118
const snippets = await getDownloadSnippets(locale);

0 commit comments

Comments
 (0)