fix TypeError: this.shortIds.split is not a function (#2507)

* fix TypeError: this.shortIds.split is not a function
This commit is contained in:
Dmitry Zhavoronkov
2024-09-02 17:02:15 +07:00
committed by GitHub
parent 2dc59a601c
commit 4494ffabb6
4 changed files with 160 additions and 160 deletions

View File

@@ -268,13 +268,13 @@ func (s *SubJsonService) realityData(rData map[string]interface{}) map[string]in
rltyData["spiderX"] = "/" + random.Seq(15)
shortIds, ok := rData["shortIds"].([]interface{})
if ok && len(shortIds) > 0 {
rltyData["shortId"] = shortIds[random.Num(len(shortIds))].(string)
rltyData["shortId"] = shortIds
} else {
rltyData["shortId"] = ""
}
serverNames, ok := rData["serverNames"].([]interface{})
if ok && len(serverNames) > 0 {
rltyData["serverName"] = serverNames[random.Num(len(serverNames))].(string)
rltyData["serverName"] = serverNames
} else {
rltyData["serverName"] = ""
}