修复AccessPlatformAPIWithRetry中bodyGeneral可能为nil的bug

This commit is contained in:
gazebo
2019-10-18 17:43:41 +08:00
parent af35dc054f
commit eabf6ff8e2

View File

@@ -166,7 +166,7 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http.
// 临时处理返回值居然不是map的情况
if bodyMap2, ok := bodyGeneral.(map[string]interface{}); ok {
bodyMap = bodyMap2
} else {
} else if bodyGeneral != nil {
bodyMap = map[string]interface{}{
KeyData: bodyGeneral,
}