mapbox / dyno

simple dynamodb client
MIT License
78 stars 31 forks source link

Illegal return #147

Open rmrice opened 5 years ago

rmrice commented 5 years ago

I'm running into a parsing issue (Illegal return) on line 249 of cli.js:

if (params.command === 'export') {
  return dyno.describeTable(function(err, desc) {
    if (err) {
      console.error(err);
      process.exit(1);
    }

    console.log(cleanDescription(desc));
    scan();
  });
}

I am pretty sure this is because return is being used outside of a function. This should probably be refactored.

cc @mapbox/atlas