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 18688ce commit d70ab1d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/vike-react/src/integration/onRenderHtml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ const onRenderHtml: OnRenderHtmlAsync = async (

export type PageHtmlStream = Awaited<ReturnType<typeof renderToStream>>
async function getPageHtml(pageContext: PageContextServer) {
let pageHtml: string | ReturnType<typeof dangerouslySkipEscape> | PageHtmlStream
if (!pageContext.Page) {
pageHtml = ''
} else {
let pageHtml: string | ReturnType<typeof dangerouslySkipEscape> | PageHtmlStream = ''
if (pageContext.Page) {
const { page } = getPageElement(pageContext)
const { stream, streamIsRequired } = pageContext.config
if (!stream && !streamIsRequired) {
Expand Down

0 comments on commit d70ab1d

Please sign in to comment.