Fix error object

This commit is contained in:
Sébastien Chopin 2017-03-22 10:37:20 +01:00
parent 2a005308d2
commit 6ab20cc6b6
1 changed files with 3 additions and 4 deletions

View File

@ -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(() => {