Skip to content

Commit 9867e39

Browse files
committed
fix error thingy
1 parent 9423a81 commit 9867e39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rich_text_parser.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,8 @@ class HtmlRichTextParser extends StatelessWidget {
632632
else if (parseContext.parentElement is TextSpan ||
633633
parseContext.parentElement is LinkTextSpan) {
634634
String lastString = parseContext.parentElement.text ?? '';
635-
if (!parseContext.parentElement.children.isEmpty) {
635+
if (!parseContext.parentElement.children.isEmpty &&
636+
parseContext.parentElement.children.last is TextSpan) {
636637
lastString = parseContext.parentElement.children.last.text ?? '';
637638
}
638639
if (lastString.endsWith(' ') || lastString.endsWith('\n')) {

0 commit comments

Comments
 (0)