From 5dcd401cd560df1493281551ce49d31298dd09bb Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Thu, 17 Dec 2020 15:59:56 -0500 Subject: [PATCH] fix: fix images sometimes being null --- src/status/profile/profile.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/status/profile/profile.nim b/src/status/profile/profile.nim index 3459ac5c91..0b75d49b38 100644 --- a/src/status/profile/profile.nim +++ b/src/status/profile/profile.nim @@ -53,7 +53,8 @@ proc toProfileModel*(profile: JsonNode): Profile = if profile.hasKey("localNickname"): result.localNickname = profile["localNickname"].str - if profile.hasKey("images"): + + if profile.hasKey("images") and profile["images"].kind != JNull: if profile["images"].hasKey("thumbnail"): result.identityImage.thumbnail = profile["images"]["thumbnail"]["uri"].str if profile["images"].hasKey("large"):