Skip to content

Commit 56e04b7

Browse files
committed
better syntax
1 parent 89945eb commit 56e04b7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,12 @@ function sanitizeHeaders(options) {
3636

3737
const hasExternalLink = Object.keys(queryObject).some(function (queryParam) {
3838
const values = _.isArray(queryObject[queryParam]) ? queryObject[queryParam] : [queryObject[queryParam]]
39-
const v = values.map(v => {
39+
return values.map(v => {
4040
const qUrl = url.parse(v);
4141

4242
// external link if protocol || host || port is different
4343
return (!!qUrl.host && ( qUrl.protocol !== urlObject.protocol || qUrl.host !== urlObject.host || qUrl.port !== urlObject.port) );
44-
})
45-
return v.some(v => v === true)
44+
}).some(v => v === true)
4645
});
4746

4847
if (hasExternalLink && options.hasOwnProperty("headers") && typeof (options.headers) === "object") {

0 commit comments

Comments
 (0)