diff --git a/lib/render.js b/lib/render.js index 3efe6f78e1..0bc8c6fe58 100644 --- a/lib/render.js +++ b/lib/render.js @@ -148,10 +148,9 @@ export function renderAndGetWindow (url, opts = {}) { window.scrollTo = function () {} // If Nuxt could not be loaded (error from the server-side) if (!window.__NUXT__) { - return reject(new Error({ - message: 'Could not load the nuxt app', - body: window.document.getElementsByTagName('body')[0].innerHTML - })) + let error = new Error('Could not load the nuxt app') + error.body = window.document.getElementsByTagName('body')[0].innerHTML + return reject(error) } // Used by nuxt.js to say when the components are loaded and the app ready window.onNuxtReady(() => {