Skip to content

Commit

Permalink
hasOwnProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusLongmuir committed Nov 22, 2017
1 parent d95bf65 commit 3b63abb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ts/src/transports/nodeHttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ function filterHeadersForUndefined(headers: {[key: string]: string | string[] |

for (let key in headers) {
const value = headers[key];
if (value !== undefined) {
filteredHeaders[key] = value;
if (headers.hasOwnProperty(key)) {
if (value !== undefined) {
filteredHeaders[key] = value;
}
}
}

Expand Down

0 comments on commit 3b63abb

Please sign in to comment.