Update editor to catch targetChild null

pull/13/head
singerdmx 4 years ago
parent 957ffcf80d
commit 12b98a8a0d
  1. 2
      lib/models/documents/history.dart
  2. 4
      lib/widgets/editor.dart

@ -89,7 +89,7 @@ class History {
return false;
}
Delta delta = source.removeLast();
Delta base = doc.toDelta();
Delta base = Delta.from(doc.toDelta());
Delta inverseDelta = delta.invert(base);
dest.add(inverseDelta);
this.lastRecorded = 0;

@ -890,7 +890,9 @@ class RenderEditableContainerBox extends RenderBox
}
targetChild = childAfter(targetChild);
}
assert(targetChild != null);
if (targetChild == null) {
throw ('targetChild should not be null');
}
return targetChild;
}

Loading…
Cancel
Save