mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 06:47:01 +00:00
fix: fix images sometimes being null
This commit is contained in:
parent
d5f3cf71a2
commit
5dcd401cd5
@ -53,7 +53,8 @@ proc toProfileModel*(profile: JsonNode): Profile =
|
|||||||
|
|
||||||
if profile.hasKey("localNickname"):
|
if profile.hasKey("localNickname"):
|
||||||
result.localNickname = profile["localNickname"].str
|
result.localNickname = profile["localNickname"].str
|
||||||
if profile.hasKey("images"):
|
|
||||||
|
if profile.hasKey("images") and profile["images"].kind != JNull:
|
||||||
if profile["images"].hasKey("thumbnail"):
|
if profile["images"].hasKey("thumbnail"):
|
||||||
result.identityImage.thumbnail = profile["images"]["thumbnail"]["uri"].str
|
result.identityImage.thumbnail = profile["images"]["thumbnail"]["uri"].str
|
||||||
if profile["images"].hasKey("large"):
|
if profile["images"].hasKey("large"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user