From 4248b3d2a937a4a6fa36d191bd42a7bbbaa66442 Mon Sep 17 00:00:00 2001 From: dphuang2 Date: Fri, 9 Aug 2019 19:13:03 -0700 Subject: [PATCH] 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. --- src/rebuild.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rebuild.ts b/src/rebuild.ts index 7200ef81..a0baf2aa 100644 --- a/src/rebuild.ts +++ b/src/rebuild.ts @@ -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; }