Skip to content

Commit

Permalink
🏷️ Update Post.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Feb 20, 2020
1 parent c42067e commit 5db0112
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/model/post.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Post {

Post.fromJson(Map<String, dynamic> json) {
json.forEach((k, v) {
if (json[k] == '') json[k] = null;
if (json[k] == '' || json[k] == <dynamic>[]) json[k] = null;
});
Map<String, dynamic> _user = json['user'];
_user.forEach((k, v) {
Expand Down

0 comments on commit 5db0112

Please sign in to comment.