Skip to content

Commit

Permalink
Fix deserializing custom column types
Browse files Browse the repository at this point in the history
  • Loading branch information
simolus3 committed Sep 6, 2024
1 parent cd09cdc commit 64612c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drift_dev/lib/src/analysis/serializer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -762,10 +762,10 @@ class ElementDeserializer {
}

Future<ColumnType> _readColumnType(Map json, Uri definition) async {
if (json.containsKey('custom')) {
if (json['custom'] case final customType?) {
return ColumnType.custom(CustomColumnType(
AnnotatedDartCode.fromJson(json['expression'] as Map),
await _readDartType(definition, json['dart'] as int),
AnnotatedDartCode.fromJson(customType['expression'] as Map),
await _readDartType(definition, customType['dart'] as int),
));
} else {
return ColumnType.drift(
Expand Down

0 comments on commit 64612c9

Please sign in to comment.