From f6d09642d769af70169bf49c1b580e0f03d62435 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sat, 7 Oct 2017 12:36:34 +0330 Subject: [PATCH] fix renderAndGetWindow for SPA mode --- lib/core/renderer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/renderer.js b/lib/core/renderer.js index 9e28ae2dd..dd0b5ddf8 100644 --- a/lib/core/renderer.js +++ b/lib/core/renderer.js @@ -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__' : '
') /* istanbul ignore if */ if (!nuxtExists) { let error = new Error('Could not load the nuxt app')