Fixes `Document.toJson` to map from raw operations (#162)

pull/180/head
Guilherme C. Matuella 4 years ago committed by GitHub
parent 7cdbdd9a6a
commit 3e576aeb9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      lib/models/quill_delta.dart

@ -265,7 +265,7 @@ class Delta {
List<Operation> toList() => List.from(_operations);
/// Returns JSON-serializable version of this delta.
List toJson() => toList();
List toJson() => toList().map((operation) => operation.toJson()).toList();
/// Returns `true` if this delta is empty.
bool get isEmpty => _operations.isEmpty;

Loading…
Cancel
Save