Skip to content

Commit

Permalink
fix(openapi): change const error by eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinzZH committed Jun 21, 2018
1 parent 69c44f4 commit c61434d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/tsw/util/openapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ this.signature = opt => {

const busidataArr = [opt.method, encode(opt.pathname)]; // HTTP请求方式 & encode(uri) & encode(a=x&b=y&...)

for (const i in opt.data) {
let i;
for (i in opt.data) {
// i !== 'sig' && queryArray.push(i + '=' + opt.data[i]); // 过滤掉undefined value的key,因为发送的时候data,会做JSON.stringify, 没有定义值的key会被过滤掉
if (typeof opt.data[i] !== 'undefined' && i !== 'sig') {
queryArray.push(i + '=' + opt.data[i]);
Expand Down

0 comments on commit c61434d

Please sign in to comment.