Skip to content

Commit

Permalink
fix(link.dart): use correct field for deserializing type
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Jun 4, 2024
1 parent 45423a4 commit ed9daa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/core/definitions/link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Link implements Serializable {
final Set<String> parsedFields = {};

final href = json.parseRequiredUriField("href", parsedFields);
final type = json.parseField<String>("@type", parsedFields);
final type = json.parseField<String>("type", parsedFields);
final rel = json.parseField<String>("rel", parsedFields);
final anchor = json.parseUriField("anchor", parsedFields);
final sizes = json.parseField<String>("sizes", parsedFields);
Expand Down
2 changes: 1 addition & 1 deletion test/core/dart_wot_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void main() {
"href": "https://example.org",
"rel": "icon",
"anchor": "https://example.org",
"@type": "test",
"type": "test",
"sizes": "42x42",
"test": "test",
"hreflang": "de",
Expand Down

0 comments on commit ed9daa8

Please sign in to comment.