We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e91694f commit 67de571Copy full SHA for 67de571
lib/model/content.dart
@@ -990,14 +990,14 @@ class _ZulipContentParser {
990
if (child is! dom.Element) return null;
991
if (child.localName != 'pre') return null;
992
993
- if (child.nodes.length > 2) return null;
+ if (child.nodes.length > 2 || child.nodes.isEmpty) return null;
994
if (child.nodes.length == 2) {
995
final first = child.nodes[0];
996
if (first is! dom.Element
997
|| first.localName != 'span'
998
|| first.nodes.isNotEmpty) return null;
999
}
1000
- final grandchild = child.nodes[child.nodes.length - 1];
+ final grandchild = child.nodes.last
1001
if (grandchild is! dom.Element) return null;
1002
if (grandchild.localName != 'code') return null;
1003
0 commit comments