diff --git a/lib/core/utils/preload-cssom.js b/lib/core/utils/preload-cssom.js index c919d023c4..7f5fab5db6 100644 --- a/lib/core/utils/preload-cssom.js +++ b/lib/core/utils/preload-cssom.js @@ -173,7 +173,11 @@ function getStylesheetsFromDocumentFragment(rootNode, convertDataToStylesheet) { isLink, root: rootNode }); - out.push(stylesheet.sheet); + // prevent error in jsdom with style elements not having a `sheet` property + // @see https://github.com/jsdom/jsdom/issues/3179 + if(stylesheet.sheet) { + out.push(stylesheet.sheet); + } return out; }, []) );