Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
kt81 committed Sep 8, 2018
1 parent 5336f84 commit b0dad90
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/requestCodeGen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,10 @@ export function requestCodeGen(paths: IPaths, options: ISwaggerOptions): string
: ''
};
let data = null;
${
let data = ${
parsedParameters && parsedParameters.bodyParameters.length > 0
? 'data = {' + parsedParameters.bodyParameters.join(',') + '}'
: ''
? '{' + parsedParameters.bodyParameters.join(',') + '}'
: 'null'
};
${contentType === 'multipart/form-data' ? formData : ''}
Expand Down

0 comments on commit b0dad90

Please sign in to comment.