From ceb15dc63f653c4c75b64b8a091b908d0c5496c5 Mon Sep 17 00:00:00 2001 From: Nomankbw <41571559+Noman5253@users.noreply.github.com> Date: Sat, 27 May 2023 18:19:54 +0530 Subject: [PATCH] Update Line no. 2752 with null check. element_subclasses.dart Added a null check at line no. 2752. Because it was throwing a compile time exception when used in a project. After doing this change it worked fine [Locally]. --- lib/src/html/dom/element_subclasses.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/html/dom/element_subclasses.dart b/lib/src/html/dom/element_subclasses.dart index 73fbd7c..bcd58b0 100644 --- a/lib/src/html/dom/element_subclasses.dart +++ b/lib/src/html/dom/element_subclasses.dart @@ -2749,7 +2749,7 @@ class StyleElement extends HtmlElement { return null; } final text = this.text; - final parsed = css.parse(text); + final parsed = css.parse(text??''); final styleSheet = CssStyleSheet.constructor(); for (var node in parsed.topLevels) { if (node is css.RuleSet) {