Files
vercel__next.js/test/e2e/app-dir/actions/components/DefaultLayout.tsx
Lucas Felicio Adriano 35d6fdf074 fix(nodejs-middleware): await for body cloning to be properly finalized (#85418)
Fixes https://github.com/vercel/next.js/issues/85416.

This is a follow up to https://github.com/vercel/next.js/pull/77662,
where the Node.js middleware was fixed to also support reading (and
duplicating) the body's request before being passed to the server
action.

However, in that PR, an `await` was missed while calling the
[.finalize()](https://github.com/vercel/next.js/blob/1b45163bce3dab30d7a79dff95238b84016b54c2/packages/next/src/server/body-streams.ts#L39)
method, which returns a Promise. That missing `await` would sometimes
cause a bug, where the server action would be invoked before the body
was completely cloned, causing the bug mentioned in the issue above.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2025-11-13 18:11:21 -08:00

15 lines
202 B
TypeScript

import React from 'react'
export default function DefaultLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html>
<head />
<body>{children}</body>
</html>
)
}