Skip to content

Commit 59013af

Browse files
LucDeCafsimolus3
authored andcommitted
add assert to CrudEntry id field
1 parent 98ef589 commit 59013af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/powersync_core/lib/src/crud.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class CrudEntry {
8282

8383
factory CrudEntry.fromRow(sqlite.Row row) {
8484
final data = jsonDecode(row['data']);
85+
assert(data['id'] is String);
8586
return CrudEntry(row['id'], UpdateType.fromJsonChecked(data['op'])!,
8687
data['type'], data['id'], row['tx_id'], data['data']);
8788
}

0 commit comments

Comments
 (0)