diff --git a/lib/basic/Entities.dart b/lib/basic/Entities.dart index 1011e15..66634ee 100644 --- a/lib/basic/Entities.dart +++ b/lib/basic/Entities.dart @@ -31,7 +31,9 @@ class BasicUser { this.verified = json["verified"]; this.exp = json["exp"]; this.level = json["level"]; - this.characters = List.of(json["characters"]).map((e) => "$e").toList(); + this.characters = json["characters"] == null + ? [] + : List.of(json["characters"]).map((e) => "$e").toList(); this.avatar = PicaImage.fromJson(Map.of(json["avatar"])); } }