Skip to content

Commit 5ec8547

Browse files
authored
Merge pull request Sub6Resources#857 from NextFaze/master
Ignore unsupported custom style selectors
2 parents a767bfd + 16c828f commit 5ec8547

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
@@ -273,9 +273,11 @@ class HtmlParser extends StatelessWidget {
273273
/// widget onto the [StyledElement] tree, no cascading of styles is done at this point.
274274
static StyledElement _applyCustomStyles(Map<String, Style> style, StyledElement tree) {
275275
style.forEach((key, style) {
276-
if (tree.matchesSelector(key)) {
277-
tree.style = tree.style.merge(style);
278-
}
276+
try {
277+
if (tree.matchesSelector(key)) {
278+
tree.style = tree.style.merge(style);
279+
}
280+
} catch (_) {}
279281
});
280282
tree.children.forEach((e) => _applyCustomStyles(style, e));
281283

0 commit comments

Comments
 (0)