Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Fix syntax error in strict mode. #147

Merged
merged 1 commit into from Dec 5, 2015
Merged

Fix syntax error in strict mode. #147

merged 1 commit into from Dec 5, 2015

Conversation

michaelhue
Copy link
Contributor

Functions in lib/args_types.js use the reserved word arguments as a variable name which results in a syntax error when running in strict mode. Renamed the variable to args (in line with other functions in the library) in order to support strict mode.

Functions in `lib/args_types.js` use the reserved word `arguments` as a variable name which results in a syntax error when running in strict mode. Renamed the variable to `args` (in line with other functions in the library) in order to support strict mode.
@michaelhue
Copy link
Contributor Author

Error message for reference:

api_1 | [nodemon] starting `node --harmony --use-strict .`
api_1 | /app/node_modules/massive/lib/arg_types.js:7
api_1 | exports.queryArgs = function(arguments){
api_1 |                              ^^^^^^^^^
api_1 | 
api_1 | SyntaxError: Unexpected eval or arguments in strict mode
api_1 |     at exports.runInThisContext (vm.js:53:16)
api_1 |     at Module._compile (module.js:404:25)
api_1 |     at Object.Module._extensions..js (module.js:432:10)
api_1 |     at Module.load (module.js:356:32)
api_1 |     at Function.Module._load (module.js:313:12)
api_1 |     at Module.require (module.js:366:17)
api_1 |     at require (module.js:385:17)
api_1 |     at Object.<anonymous> (/app/node_modules/massive/lib/runner.js:5:16)
api_1 |     at Module._compile (module.js:425:26)
api_1 |     at Object.Module._extensions..js (module.js:432:10)
api_1 |     at Module.load (module.js:356:32)
api_1 |     at Function.Module._load (module.js:313:12)
api_1 |     at Module.require (module.js:366:17)
api_1 |     at require (module.js:385:17)
api_1 |     at Object.<anonymous> (/app/node_modules/massive/index.js:1:76)
api_1 |     at Module._compile (module.js:425:26)
api_1 | [nodemon] app crashed - waiting for file changes before starting...

robconery added a commit that referenced this pull request Dec 5, 2015
Fix syntax error in strict mode.
@robconery robconery merged commit e76f8d5 into dmfay:master Dec 5, 2015
@robconery
Copy link
Contributor

Thanks!@

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants