Fixes `Document.toJson` to map from raw operations

pull/162/head
Guilherme C. Matuella 4 years ago
parent 7cdbdd9a6a
commit 73519c134f
  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