Skip to content

Commit

Permalink
Do not merge empty changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
cachapa committed Aug 8, 2023
1 parent 11f79b1 commit 8dc8031
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/src/sql_crdt.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ abstract class SqlCrdt extends TimestampedCrdt {
/// Merge [changeset] into database
Future<void> merge(
Map<String, Iterable<Map<String, Object?>>> changeset) async {
if (changeset.recordCount == 0) return;

var canon = _canonicalTime;
await _db.transaction((txn) async {
// Iterate through all the remote timestamps to
Expand Down

0 comments on commit 8dc8031

Please sign in to comment.