var esperanto = require('esperanto');
esperanto.toAmd('[1,,3,4]', {
strict: true
});
Gives the following error:
/Users/rjackson/Source/javascript/es6-testing/node_modules/esperanto/dist/esperanto.js:159
if ( node.type === 'ImportDeclaration' || node.type === 'ExportSpecifier' )
^
TypeError: Cannot read property 'type' of null
at Object.walk.enter (/Users/rjackson/Source/javascript/es6-testing/node_modules/esperanto/dist/esperanto.js:159:13)
at visit (/Users/rjackson/Source/javascript/es6-testing/node_modules/esperanto/dist/esperanto.js:57:9)
at visit (/Users/rjackson/Source/javascript/es6-testing/node_modules/esperanto/dist/esperanto.js:75:5)
at visit (/Users/rjackson/Source/javascript/es6-testing/node_modules/esperanto/dist/esperanto.js:80:4)
at visit (/Users/rjackson/Source/javascript/es6-testing/node_modules/esperanto/dist/esperanto.js:75:5)
at walk (/Users/rjackson/Source/javascript/es6-testing/node_modules/esperanto/dist/esperanto.js:39:2)
at annotateAst (/Users/rjackson/Source/javascript/es6-testing/node_modules/esperanto/dist/esperanto.js:157:2)
at getStandaloneModule (/Users/rjackson/Source/javascript/es6-testing/node_modules/esperanto/dist/esperanto.js:630:3)
at Object.toAmd (/Users/rjackson/Source/javascript/es6-testing/node_modules/esperanto/dist/esperanto.js:2449:13)
at Object.<anonymous> (/Users/rjackson/Source/javascript/es6-testing/test.js:3:11)
Just to make this more concrete, the regenerator output from Babel translates to the following when using async/await:
Simplest reproduction:
Gives the following error:
Just to make this more concrete, the regenerator output from Babel translates to the following when using async/await:
We get the following output:
Which is how this manifested itself...