Skip to content

Commit ed9daa8

Browse files
committed
fix(link.dart): use correct field for deserializing type
1 parent 45423a4 commit ed9daa8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/src/core/definitions/link.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Link implements Serializable {
3636
final Set<String> parsedFields = {};
3737

3838
final href = json.parseRequiredUriField("href", parsedFields);
39-
final type = json.parseField<String>("@type", parsedFields);
39+
final type = json.parseField<String>("type", parsedFields);
4040
final rel = json.parseField<String>("rel", parsedFields);
4141
final anchor = json.parseUriField("anchor", parsedFields);
4242
final sizes = json.parseField<String>("sizes", parsedFields);

test/core/dart_wot_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void main() {
4848
"href": "https://example.org",
4949
"rel": "icon",
5050
"anchor": "https://example.org",
51-
"@type": "test",
51+
"type": "test",
5252
"sizes": "42x42",
5353
"test": "test",
5454
"hreflang": "de",

0 commit comments

Comments
 (0)