clenemt/docdash

Error on Generation

Smolations opened this issue · 4 comments

I have tried several other JSDoc (v3.5.5) template packages found on Npm, and they generate the docs without issue. However, I ran into a hard error when first using this template:

Parsing /path/to/Workspaces/myproject/externals.jsdoc ...
Parsing /path/to/Workspaces/myproject/modules.jsdoc ...
Generating output files...
/path/to/Workspaces/myproject/node_modules/docdash/publish.js:335
            if (item.ancestors.length > level) {
                               ^

TypeError: Cannot read property 'length' of undefined

Changing that line to if (item.ancestors && item.ancestors.length > level) { then allowed the generation to run. I actually have several directories of files with docs but the above shows that paring down the list to very few docs was still resulting in the same error. Everything is running on node v10.15.1.

toddq commented

I'd been using docdash just for classes on a small project without incident, but ran into this today when I tried adding a tutorial. Appreciate the workaround, hope this gets pulled into a release.

toddq commented

I commented too soon! I see now a fix was already merged for this. Just need a new release.
#51

Released new version including this fix and more

Thanks for the quick action @ar2rsawseen!