Skip to content

Commit

Permalink
Refactor the type of Delta().toJson() (singerdmx#1694)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cierra-Runis committed Jan 21, 2024
1 parent 97a5ed1 commit a6b94f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dart_quill_delta/lib/src/delta/delta.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ class Delta {
List<Operation> toList() => List.from(operations);

/// Returns JSON-serializable version of this delta.
List toJson() => toList().map((operation) => operation.toJson()).toList();
List<Map<String, dynamic>> toJson() =>
toList().map((operation) => operation.toJson()).toList();

/// Returns `true` if this delta is empty.
bool get isEmpty => operations.isEmpty;
Expand Down

0 comments on commit a6b94f6

Please sign in to comment.