mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-12 23:35:32 +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["membersCount"] = %* communityUrlDataDto.membersCount
|
||||||
jsonObj["color"] = %* communityUrlDataDto.color
|
jsonObj["color"] = %* communityUrlDataDto.color
|
||||||
jsonObj["communityId"] = %* communityUrlDataDto.communityId
|
jsonObj["communityId"] = %* communityUrlDataDto.communityId
|
||||||
jsonObj["shardCluster"] = %* communityUrlDataDto.shard.cluster
|
jsonObj["shardCluster"] = %*(if communityUrlDataDto.shard != nil: communityUrlDataDto.shard.cluster else: -1)
|
||||||
jsonObj["shardIndex"] = %* communityUrlDataDto.shard.index
|
jsonObj["shardIndex"] = %*(if communityUrlDataDto.shard != nil: communityUrlDataDto.shard.index else: -1)
|
||||||
return jsonObj
|
return jsonObj
|
||||||
|
|
||||||
proc `$`*(communityUrlDataDto: CommunityUrlDataDto): string =
|
proc `$`*(communityUrlDataDto: CommunityUrlDataDto): string =
|
||||||
|
@ -46,8 +46,10 @@ StatusDialog {
|
|||||||
if (!linkData) {
|
if (!linkData) {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
if (linkData.shardCluster != undefined && linkData.shardIndex != undefined) {
|
||||||
d.shardCluster = linkData.shardCluster
|
d.shardCluster = linkData.shardCluster
|
||||||
d.shardIndex = linkData.shardIndex
|
d.shardIndex = linkData.shardIndex
|
||||||
|
}
|
||||||
return linkData.communityId
|
return linkData.communityId
|
||||||
}
|
}
|
||||||
if (!Utils.isCommunityPublicKey(inputKey))
|
if (!Utils.isCommunityPublicKey(inputKey))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user