Skip to content

Commit 9f94664

Browse files
Pritilenderthomseddon
authored andcommitted
Changed 'hasOwnProperty' call in Request
1 parent ae44d92 commit 9f94664

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/request.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ function Request(options) {
3333

3434
// Store the headers in lower case.
3535
for (var field in options.headers) {
36-
if (options.headers.hasOwnProperty(field)) {
36+
if (Object.prototype.hasOwnProperty.call(options.headers, field)) {
3737
this.headers[field.toLowerCase()] = options.headers[field];
3838
}
3939
}
4040

4141
// Store additional properties of the request object passed in
4242
for (var property in options) {
43-
if (options.hasOwnProperty(property) && !this[property]) {
43+
if (Object.prototype.hasOwnProperty.call(options, property) && !this[property]) {
4444
this[property] = options[property];
4545
}
4646
}

0 commit comments

Comments
 (0)