fix for #180
This commit is contained in:
@@ -100,7 +100,7 @@ class OperationView extends Backbone.View
|
||||
|
||||
# add params except file
|
||||
for param in @model.parameters
|
||||
if (param.paramType is 'body' or 'form') and param.name isnt 'file'
|
||||
if (param.paramType is 'body' or 'form') and param.name isnt 'file' and map[param.name]?
|
||||
bodyParam.append(param.name, map[param.name])
|
||||
|
||||
# add files
|
||||
@@ -111,7 +111,8 @@ class OperationView extends Backbone.View
|
||||
else if isFormPost
|
||||
bodyParam = new FormData()
|
||||
for param in @model.parameters
|
||||
bodyParam.append(param.name, map[param.name])
|
||||
if map[param.name]?
|
||||
bodyParam.append(param.name, map[param.name])
|
||||
else
|
||||
bodyParam = null
|
||||
for param in @model.parameters
|
||||
|
||||
Reference in New Issue
Block a user