diff --git a/docs/guide/ssr.md b/docs/guide/ssr.md index 1e2ea3be7d6bd7..f75858edc6f3eb 100644 --- a/docs/guide/ssr.md +++ b/docs/guide/ssr.md @@ -149,7 +149,7 @@ app.use('*', async (req, res, next) => { const appHtml = await render(url) // 5. Inject the app-rendered HTML into the template. - const html = template.replace(``, appHtml) + const html = template.replace(``, () => appHtml) // 6. Send the rendered HTML back. res.status(200).set({ 'Content-Type': 'text/html' }).end(html)