Skip to content

Commit d398571

Browse files
committed
ensure last arg of renderToStream isn't a function
our trace wrapper assumes that last arg being a function is actually a callback which caused a span to get dropped
1 parent af3e4b9 commit d398571

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/next/src/server/app-render/app-render.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,8 +1870,8 @@ async function renderToHTMLOrFlightImpl(
18701870
formState,
18711871
postponedState,
18721872
metadata,
1873-
devValidatingFallbackParams,
1874-
undefined // Prevent restartable-render behavior in dev + Cache Components mode
1873+
undefined, // Prevent restartable-render behavior in dev + Cache Components mode
1874+
devValidatingFallbackParams
18751875
)
18761876

18771877
return new RenderResult(stream, {
@@ -1909,13 +1909,13 @@ async function renderToHTMLOrFlightImpl(
19091909
formState,
19101910
postponedState,
19111911
metadata,
1912-
devValidatingFallbackParams,
19131912
// If we're rendering HTML after an action, we don't want restartable-render behavior
19141913
// because the result should be dynamic, like it is in prod.
19151914
// Also, the request store might have been mutated by the action (e.g. enabling draftMode)
19161915
// and we currently we don't copy changes over when creating a new store,
19171916
// so the restarted render wouldn't be correct.
1918-
didExecuteServerAction ? undefined : createRequestStore
1917+
didExecuteServerAction ? undefined : createRequestStore,
1918+
devValidatingFallbackParams
19191919
)
19201920

19211921
// Invalid dynamic usages should only error the request in development.
@@ -2114,8 +2114,8 @@ async function renderToStream(
21142114
formState: any,
21152115
postponedState: PostponedState | null,
21162116
metadata: AppPageRenderResultMetadata,
2117-
devValidatingFallbackParams: OpaqueFallbackRouteParams | null,
2118-
createRequestStore: (() => RequestStore) | undefined
2117+
createRequestStore: (() => RequestStore) | undefined,
2118+
devValidatingFallbackParams: OpaqueFallbackRouteParams | null
21192119
): Promise<ReadableStream<Uint8Array>> {
21202120
const { assetPrefix, htmlRequestId, nonce, pagePath, renderOpts, requestId } =
21212121
ctx

0 commit comments

Comments
 (0)