Skip to content

Commit

Permalink
Trim both
Browse files Browse the repository at this point in the history
  • Loading branch information
vaheqelyan committed Jan 11, 2019
1 parent 62a09c7 commit 35c2da7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/template/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ function parseHeaders(res) {
res.split("\n").forEach(value => {
var getIndex = value.indexOf(":");
if (getIndex !== -1) {
const key = value.slice(0, getIndex);
const val = value.slice(getIndex + 1, value.length);
headers[key] = val.trimLeft();
const key = value.slice(0, getIndex).trim();
const val = value.slice(getIndex + 1, value.length).trim();
headers[key] = val;
}
});
return headers;
Expand Down

0 comments on commit 35c2da7

Please sign in to comment.