mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-12 15:24:39 +00:00
fix: check nil shard (#12927)
This commit is contained in:
parent
c2bfc6b8f4
commit
de89b3ee77
@ -90,8 +90,8 @@ proc toJsonNode*(communityUrlDataDto: CommunityUrlDataDto): JsonNode =
|
||||
jsonObj["membersCount"] = %* communityUrlDataDto.membersCount
|
||||
jsonObj["color"] = %* communityUrlDataDto.color
|
||||
jsonObj["communityId"] = %* communityUrlDataDto.communityId
|
||||
jsonObj["shardCluster"] = %* communityUrlDataDto.shard.cluster
|
||||
jsonObj["shardIndex"] = %* communityUrlDataDto.shard.index
|
||||
jsonObj["shardCluster"] = %*(if communityUrlDataDto.shard != nil: communityUrlDataDto.shard.cluster else: -1)
|
||||
jsonObj["shardIndex"] = %*(if communityUrlDataDto.shard != nil: communityUrlDataDto.shard.index else: -1)
|
||||
return jsonObj
|
||||
|
||||
proc `$`*(communityUrlDataDto: CommunityUrlDataDto): string =
|
||||
|
@ -46,8 +46,10 @@ StatusDialog {
|
||||
if (!linkData) {
|
||||
return ""
|
||||
}
|
||||
d.shardCluster = linkData.shardCluster
|
||||
d.shardIndex = linkData.shardIndex
|
||||
if (linkData.shardCluster != undefined && linkData.shardIndex != undefined) {
|
||||
d.shardCluster = linkData.shardCluster
|
||||
d.shardIndex = linkData.shardIndex
|
||||
}
|
||||
return linkData.communityId
|
||||
}
|
||||
if (!Utils.isCommunityPublicKey(inputKey))
|
||||
|
Loading…
x
Reference in New Issue
Block a user