diff --git a/Assets/Plugins/Appboy/models/Cards/Card.cs b/Assets/Plugins/Appboy/models/Cards/Card.cs index 6ccaaa705..6b3dfa6ee 100755 --- a/Assets/Plugins/Appboy/models/Cards/Card.cs +++ b/Assets/Plugins/Appboy/models/Cards/Card.cs @@ -47,11 +47,14 @@ public Card(JSONClass json) { Categories.Add(CardCategory.NO_CATEGORY); } else { for (int i = 0; i < jsonArray.Count; i++) { - CardCategory category = (CardCategory)EnumUtils.TryParse(typeof(CardCategory), jsonArray[i], true, null); - if (category != null) { + CardCategory category = (CardCategory)EnumUtils.TryParse(typeof(CardCategory), jsonArray[i], true, CardCategory.NO_CATEGORY); + if (category != CardCategory.NO_CATEGORY) { Categories.Add(category); } } + if (Categories.Count == 0) { + Categories.Add(CardCategory.NO_CATEGORY); + } } }