Skip to content

Commit

Permalink
change way how we call hasOwnProperty
Browse files Browse the repository at this point in the history
hapijs/hapi#3280 (comment)

Fixing:

TypeError: arguments.hasOwnProperty is not a function
    at parseAttacksArguments (/home/ogajduse/Documents/repos/dosgen/dosgen-web/routes/dosgen.js:67:23)
    at /home/ogajduse/Documents/repos/dosgen/dosgen-web/routes/dosgen.js:24:16
    at Layer.handle [as handle_request] (/home/ogajduse/Documents/repos/dosgen/dosgen-web/node_modules/express/lib/router/layer.js:82:5)
    at next (/home/ogajduse/Documents/repos/dosgen/dosgen-web/node_modules/express/lib/router/route.js:110:13)
    at Route.dispatch (/home/ogajduse/Documents/repos/dosgen/dosgen-web/node_modules/express/lib/router/route.js:91:3)
    at Layer.handle [as handle_request] (/home/ogajduse/Documents/repos/dosgen/dosgen-web/node_modules/express/lib/router/layer.js:82:5)
    at /home/ogajduse/Documents/repos/dosgen/dosgen-web/node_modules/express/lib/router/index.js:267:22
    at Function.proto.process_params (/home/ogajduse/Documents/repos/dosgen/dosgen-web/node_modules/express/lib/router/index.js:321:12)
    at next (/home/ogajduse/Documents/repos/dosgen/dosgen-web/node_modules/express/lib/router/index.js:261:10)
    at Function.proto.handle (/home/ogajduse/Documents/repos/dosgen/dosgen-web/node_modules/express/lib/router/index.js:166:3)
  • Loading branch information
ogajduse committed May 18, 2018
1 parent 226ac89 commit d4350d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dosgen-web/routes/dosgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function parseAttacksArguments(arguments) {
var attacksSettings = {};

for (var attackFullName in arguments) {
if (arguments.hasOwnProperty(attackFullName)) {
if (Object.prototype.hasOwnProperty.call(arguments, attackFullName)) {
var attackValue = arguments[attackFullName];
var attackTypeAndArg = attackFullName.split(":");
if (attackTypeAndArg.length != 2)
Expand Down

0 comments on commit d4350d9

Please sign in to comment.