fix: check empty upload

This commit is contained in:
buyuxiang
2022-07-12 17:06:02 +08:00
parent a76b3b399d
commit 296295a928
3 changed files with 4 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ package hrp
import (
"fmt"
"github.com/jinzhu/copier"
"github.com/rs/zerolog/log"
@@ -126,7 +127,7 @@ func extendWithAPI(testStep *TStep, overriddenStep *API) {
// merge & override request
testStep.Request = overriddenStep.Request
// init upload
if testStep.Request.Upload != nil {
if len(testStep.Request.Upload) != 0 {
initUpload(testStep)
}
// merge & override variables