From 8eccf9073acf92414bea43c738ca5596dc4d69f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Holl=C3=A4nder?= Date: Tue, 20 Jul 2021 14:28:05 +0200 Subject: [PATCH] fix exception when parsing CSS @import rules (#187) fix #177 --- src/context/stylesheets.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/context/stylesheets.ts b/src/context/stylesheets.ts index 96ac62d4..84e70dfe 100644 --- a/src/context/stylesheets.ts +++ b/src/context/stylesheets.ts @@ -71,6 +71,7 @@ export class StyleSheets { const cssRule = sheet.cssRules[i] if (!(cssRule instanceof CSSStyleRule)) { sheet.deleteRule(i) + continue } const cssStyleRule = cssRule as CSSStyleRule if (cssStyleRule.selectorText.indexOf(',') >= 0) {