fix: nextLine getter null where no assertion (#1061)

pull/1070/head
Thea Choem 2 years ago committed by GitHub
parent e0016c9841
commit 8352fce964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      lib/src/models/documents/nodes/line.dart

@ -381,7 +381,7 @@ class Line extends Container<Leaf?> {
}
final remaining = len - local;
if (remaining > 0) {
if (remaining > 0 && nextLine != null) {
final rest = nextLine!.collectStyle(0, remaining);
_handle(rest);
}
@ -416,7 +416,7 @@ class Line extends Container<Leaf?> {
// TODO: add line style and parent's block style
final remaining = len - local;
if (remaining > 0) {
if (remaining > 0 && nextLine != null) {
final rest =
nextLine!.collectAllIndividualStyles(0, remaining, beg: local);
result.addAll(rest);
@ -450,7 +450,7 @@ class Line extends Container<Leaf?> {
}
final remaining = len - local;
if (remaining > 0) {
if (remaining > 0 && nextLine != null) {
final rest = nextLine!.collectAllStyles(0, remaining);
result.addAll(rest);
}
@ -501,7 +501,7 @@ class Line extends Container<Leaf?> {
}
}
if (_len > 0) {
if (_len > 0 && nextLine != null) {
_len = nextLine!._getPlainText(0, _len, plainText);
}
}

Loading…
Cancel
Save