Skip to content

Commit a27d7dd

Browse files
committed
Update SitePluginsMapper to parse contents without the data envelope
1 parent 507352d commit a27d7dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Networking/Networking/Mapper/SitePluginsMapper.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ struct SitePluginsMapper: Mapper {
1717
.siteID: siteID
1818
]
1919

20-
return try decoder.decode(SitePluginsEnvelope.self, from: response).plugins
20+
do {
21+
return try decoder.decode(SitePluginsEnvelope.self, from: response).plugins
22+
} catch {
23+
return try decoder.decode([SitePlugin].self, from: response)
24+
}
2125
}
2226
}
2327

0 commit comments

Comments
 (0)