Skip to content

Commit d9df272

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 17efea1 + 917f78d commit d9df272

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/html_parser.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,11 @@ class HtmlParser extends StatelessWidget {
245245

246246
static StyledElement _applyExternalCss(Map<String, Map<String, List<css.Expression>>> declarations, StyledElement tree) {
247247
declarations.forEach((key, style) {
248-
if (tree.matchesSelector(key)) {
249-
tree.style = tree.style.merge(declarationsToStyle(style));
250-
}
248+
try {
249+
if (tree.matchesSelector(key)) {
250+
tree.style = tree.style.merge(declarationsToStyle(style));
251+
}
252+
} catch (_) {}
251253
});
252254

253255
tree.children.forEach((e) => _applyExternalCss(declarations, e));

0 commit comments

Comments
 (0)