JSONObjKeys 에서 result가 없을 때 크래시 방지

This commit is contained in:
2023-08-23 22:44:14 +09:00
parent c34045e215
commit 400c7f6443

View File

@ -392,6 +392,10 @@ func (rh *RedisonHandler) JSONObjKeys(key, path string) ([]string, error) {
}
resArr := res.([]any)
if len(resArr) == 0 {
return nil, nil
}
resArr = resArr[0].([]any)
slc := make([]string, len(resArr))