Skip to content

Commit

Permalink
Changed 'hasOwnProperty' call in Response
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritilender committed Sep 6, 2017
1 parent 92f0a0b commit 68ef835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ function Response(options) {

// Store the headers in lower case.
for (var field in options.headers) {
if (options.headers.hasOwnProperty(field)) {
if (Object.prototype.hasOwnProperty.call(options.headers, field)) {
this.headers[field.toLowerCase()] = options.headers[field];
}
}

// Store additional properties of the response object passed in
for (var property in options) {
if (options.hasOwnProperty(property) && !this[property]) {
if (Object.prototype.hasOwnProperty.call(options, property) && !this[property]) {
this[property] = options[property];
}
}
Expand Down

0 comments on commit 68ef835

Please sign in to comment.