diff --git a/packages/server/src/jsdom.js b/packages/server/src/jsdom.js index 516fab8779..7cc0927fbe 100644 --- a/packages/server/src/jsdom.js +++ b/packages/server/src/jsdom.js @@ -43,6 +43,9 @@ export default async function renderAndGetWindow ( } // Throw error when window creation failed 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)