diff --git a/lib/src/html/dom/element_subclasses.dart b/lib/src/html/dom/element_subclasses.dart index 9a8628e..cebc60d 100644 --- a/lib/src/html/dom/element_subclasses.dart +++ b/lib/src/html/dom/element_subclasses.dart @@ -2755,7 +2755,7 @@ class StyleElement extends HtmlElement { return null; } final text = this.text; - final parsed = css.parse(text as String); + final parsed = css.parse(text ?? ''); final styleSheet = CssStyleSheet.constructor(); for (var node in parsed.topLevels) { if (node is css.RuleSet) {