esdoc / esdoc-plugins

MIT License
140 stars 77 forks source link

ECMAScript proposals bug: Cannot read property 'charAt' of undefined #79

Open maple-leaf opened 5 years ago

maple-leaf commented 5 years ago

Repository to produce bug: https://github.com/maple-leaf/esdoc-proposals-plugin-bug-reproduce

source code in repo:

const x = {};
x['d'] = function() {
    console.log('test');
};

Install npm deps and generate doc by npx esdoc will raise error:

Cannot read property 'charAt' of undefined
ghost commented 5 years ago

Having the same issue

DanielRuf commented 4 years ago

Duplicate of https://github.com/esdoc/esdoc-plugins/issues/28

Simply change it to if (autoPrivate && doc.name && doc.name.charAt(0) === '_') {