mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
fix renderAndGetWindow for SPA mode
This commit is contained in:
parent
5f8be57172
commit
f6d09642d7
@ -579,7 +579,7 @@ export default class Renderer extends Tapable {
|
||||
url = url || 'http://localhost:3000'
|
||||
const { window } = await jsdom.JSDOM.fromURL(url, options)
|
||||
// If Nuxt could not be loaded (error from the server-side)
|
||||
const nuxtExists = window.document.body.innerHTML.includes('window.__NUXT__')
|
||||
const nuxtExists = window.document.body.innerHTML.includes(this.options.render.ssr ? 'window.__NUXT__' : '<div id="__nuxt">')
|
||||
/* istanbul ignore if */
|
||||
if (!nuxtExists) {
|
||||
let error = new Error('Could not load the nuxt app')
|
||||
|
Loading…
Reference in New Issue
Block a user