Ignore broken CSS (#15)

Broken CSS inside a page will throw an error on our behalf. This should
be ignored because we are not in control of the CSS on the page we are
recording.
This commit is contained in:
dphuang2
2019-08-09 19:13:03 -07:00
committed by yz-yu
parent 950c94d69c
commit 4248b3d2a9

View File

@@ -58,7 +58,7 @@ function getTagName(n: elementNode): string {
const HOVER_SELECTOR = /([^\\]):hover/g;
export function addHoverClass(cssText: string): string {
const ast = parse(cssText);
const ast = parse(cssText, {silent: true});
if (!ast.stylesheet) {
return cssText;
}