From 6ab20cc6b630bcf9be413e54ba1db7229fd7074f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Wed, 22 Mar 2017 10:37:20 +0100 Subject: [PATCH] Fix error object --- lib/render.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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(() => {