Ran across this issue today with some user code on our site:
~ ❯ node
> var async = require('async')
undefined
> async.map(process.nosir, function() {}, function() {});
TypeError: Cannot read property 'map' of undefined
at _map (/home/vagrant/node_modules/async/lib/async.js:54:16)
at _asyncMap (/home/vagrant/node_modules/async/lib/async.js:237:15)
at Object.map (/home/vagrant/node_modules/async/lib/async.js:219:23)
at repl:1:7
at REPLServer.self.eval (repl.js:110:21)
at repl.js:249:20
at REPLServer.self.eval (repl.js:122:7)
at Interface.<anonymous> (repl.js:239:12)
at Interface.emit (events.js:95:17)
at Interface._onLine (readline.js:202:10)
Is it possible to do some kind of assertion or something at the beginning of the method to ensure that invalid data is not passed in?
Ran across this issue today with some user code on our site:
Is it possible to do some kind of assertion or something at the beginning of the method to ensure that invalid data is not passed in?