Skip to content

Commit e80ec91

Browse files
fixup! make site work with the Cloudflare OpenNext adapter
1 parent 183a718 commit e80ec91

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

apps/site/app/[locale]/next-data/api-data/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const getPathnameForApiFile = (name: string, version: string) =>
2121
// for a digest and metadata of all API pages from the Node.js Website
2222
// @see https://nextjs.org/docs/app/building-your-application/routing/router-handlers
2323
export const GET = async () => {
24-
const releases = await provideReleaseData();
24+
const releases = provideReleaseData();
2525

2626
const { versionWithPrefix } = releases.find(
2727
release => release.status === 'LTS'

apps/site/next-data/providers/releaseData.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { cache } from 'react';
22

33
import generateReleaseData from '@/next-data/generators/releaseData.mjs';
44

5-
const provideReleaseData = cache(() => generateReleaseData());
5+
const releaseData = await generateReleaseData();
6+
7+
const provideReleaseData = cache(() => releaseData);
68

79
export default provideReleaseData;

0 commit comments

Comments
 (0)