diff --git a/src/main/java/cc/fascinated/bat/premium/PremiumProfile.java b/src/main/java/cc/fascinated/bat/premium/PremiumProfile.java index cb63d13..a798981 100644 --- a/src/main/java/cc/fascinated/bat/premium/PremiumProfile.java +++ b/src/main/java/cc/fascinated/bat/premium/PremiumProfile.java @@ -113,7 +113,7 @@ public class PremiumProfile extends Serializable { public void load(Document document, Gson gson) { this.activatedAt = (Date) document.getOrDefault("activatedAt", new Date()); this.expiresAt = (Date) document.getOrDefault("expiresAt", null); - this.type = document.containsKey("type") ? Type.valueOf(document.getString("type")) : null; + this.type = document.getString("type") != null ? Type.valueOf(document.getString("type")) : null; } @Override