Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: names is not defined #3

Open
nemo opened this issue Aug 10, 2017 · 0 comments
Open

ReferenceError: names is not defined #3

nemo opened this issue Aug 10, 2017 · 0 comments

Comments

@nemo
Copy link

nemo commented Aug 10, 2017

< ReferenceError: names is not defined
<     at args.forEach.arg (/...../node_modules/lib/lib/parse.js:24:34)
<     at Array.forEach (native)
<     at module.exports (/...../node_modules/lib/lib/parse.js:17:8)
<     at Proxy.__call__ (/...../node_modules/lib/lib.js:21:19)
<     at Promise (/...../lib/emails.js:39:29)
<     at Promise._execute (/...../node_modules/bluebird/js/release/debuggability.js:300:9)
<     at Promise._resolveFromExecutor (/...../node_modules/bluebird/js/release/promise.js:483:18)
<     at new Promise (/...../node_modules/bluebird/js/release/promise.js:79:10)
<     at Promise.map (/...../lib/emails.js:17:60)
<     at tryCatcher (/...../node_modules/bluebird/js/release/util.js:16:23)
<     at MappingPromiseArray._promiseFulfilled (/...../node_modules/bluebird/js/release/map.js:61:38)
<     at MappingPromiseArray.PromiseArray._iterate (/...../node_modules/bluebird/js/release/promise_array.js:114:31)
<     at MappingPromiseArray.init (/...../node_modules/bluebird/js/release/promise_array.js:78:10)
<     at MappingPromiseArray._asyncInit (/...../node_modules/bluebird/js/release/map.js:30:10)
<     at Async._drainQueue (/...../node_modules/bluebird/js/release/async.js:138:12)
<     at Async._drainQueues (/...../node_modules/bluebird/js/release/async.js:143:10)

Here's the error in parse.js:

args.forEach(arg => {
    if (
      arg !== null &&
      typeof arg !== 'boolean' &&
      typeof arg !== 'string' &&
      typeof arg !== 'number'
    ) {
      let err = new TypeError(`${names.join('.')}: All arguments must be Boolean, Number, String or null`);
      let stack = err.stack.split('\n');
      stack = stack.slice(0, 1).concat(stack.slice(5));
      stack[1] = stack[1].replace('Object.<anonymous>', names.join('.'));
      err.stack = stack.join('\n');
      throw err;
    }
  });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant