mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-21 05:09:00 +00:00
fix potential crash with reminders
This commit is contained in:
parent
8a467b04c4
commit
2ddc426d6b
1 changed files with 3 additions and 1 deletions
|
|
@ -19,7 +19,9 @@ public class RemindersItemSerializer
|
||||||
public JsonElement serialize(RemindersItem src, Type typeOfSrc, JsonSerializationContext context) {
|
public JsonElement serialize(RemindersItem src, Type typeOfSrc, JsonSerializationContext context) {
|
||||||
JsonObject object = new JsonObject();
|
JsonObject object = new JsonObject();
|
||||||
object.addProperty("id", src.getId());
|
object.addProperty("id", src.getId());
|
||||||
object.addProperty("startDate", src.getStartDate().getTime());
|
if (src.getStartDate() != null) {
|
||||||
|
object.addProperty("startDate", src.getStartDate().getTime());
|
||||||
|
}
|
||||||
object.addProperty("time", src.getTime().getTime());
|
object.addProperty("time", src.getTime().getTime());
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue