Skip to content

Commit

Permalink
fix: assign markup to ssr context
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Oct 4, 2019
1 parent b1a9b33 commit 002bb91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/saber/vue-renderer/lib/render-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const getInitialDocument = require('./get-initial-document')

module.exports = async (renderer, { url, hooks, isProd }) => {
const context = { url }
const markup = await renderer.renderToString(context)
context.markup = await renderer.renderToString(context)

// Get document data that is used to document string
const documentData = hooks.getDocumentData.call(
Expand All @@ -25,7 +25,7 @@ module.exports = async (renderer, { url, hooks, isProd }) => {
return {
html: `<!DOCTYPE html>${document}`.replace(
'<div id="_saber"></div>',
markup
context.markup
),
context
}
Expand Down

0 comments on commit 002bb91

Please sign in to comment.