mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
fix(server): remove virtualConsole
option when disabled (#8263)
This commit is contained in:
parent
5b02f5b38c
commit
0bd21413cb
@ -43,6 +43,9 @@ export default async function renderAndGetWindow (
|
|||||||
}
|
}
|
||||||
// Throw error when window creation failed
|
// Throw error when window creation failed
|
||||||
options.virtualConsole.on('jsdomError', jsdomErrHandler)
|
options.virtualConsole.on('jsdomError', jsdomErrHandler)
|
||||||
|
} else {
|
||||||
|
// If we get the virtualConsole option as `false` we should delete for don't pass it to `jsdom.JSDOM.fromURL`
|
||||||
|
delete options.virtualConsole
|
||||||
}
|
}
|
||||||
|
|
||||||
const { window } = await jsdom.JSDOM.fromURL(url, options)
|
const { window } = await jsdom.JSDOM.fromURL(url, options)
|
||||||
|
Loading…
Reference in New Issue
Block a user