mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
fix: throw jsdomError to avoid renderAndGetWindow hanging
This commit is contained in:
parent
0a823252ae
commit
d6f22c904d
@ -422,7 +422,8 @@ module.exports = class Renderer {
|
||||
}
|
||||
}
|
||||
if (opts.virtualConsole !== false) {
|
||||
options.virtualConsole = new jsdom.VirtualConsole().sendTo(console)
|
||||
options.virtualConsole = new jsdom.VirtualConsole().sendTo(console, { omitJSDOMErrors: true })
|
||||
options.virtualConsole.on('jsdomError', err => { throw err })
|
||||
}
|
||||
url = url || 'http://localhost:3000'
|
||||
const { window } = await jsdom.JSDOM.fromURL(url, options)
|
||||
|
Loading…
Reference in New Issue
Block a user