Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Nov 20, 2024
1 parent 958d8da commit 997fbbc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/vike-react/src/integration/onRenderHtml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,14 @@ async function getPageHtml(pageContext: PageContextServer) {
pageContext.pageHtmlString = pageHtmlString
pageHtml = dangerouslySkipEscape(pageHtmlString)
} else {
const disable = stream === false ? true : undefined
const pageHtmlStream = await renderToStream(pageContext.page, {
webStream: typeof stream === 'string' ? stream === 'web' : undefined,
userAgent:
pageContext.headers?.['user-agent'] ||
// TODO/eventually: remove old way of acccessing the User Agent header.
// @ts-ignore
pageContext.userAgent,
disable,
disable: stream === false ? true : undefined,
})
pageContext.pageHtmlStream = pageHtmlStream
pageHtml = pageHtmlStream
Expand Down

0 comments on commit 997fbbc

Please sign in to comment.