jsdoc2md / dmd

The default output template for jsdoc2md
MIT License
39 stars 49 forks source link

TypeError: Cannot read property 'hash' of undefined #27

Closed jamen closed 8 years ago

jamen commented 8 years ago

When trying to generate some markdown for my project,

$ jsdoc-parse tokens/*.js | dmd

I ran into an issue:

Error: Cannot read property 'hash' of undefined
TypeError: Cannot read property 'hash' of undefined
    at Object.anchorName (/home/jamen/.npm-global/lib/node_modules/dmd/node_modules/ddata/lib/ddata.js:704:12)
    at _link (/home/jamen/.npm-global/lib/node_modules/dmd/node_modules/ddata/lib/ddata.js:395:37)
    at Object.link (/home/jamen/.npm-global/lib/node_modules/dmd/node_modules/ddata/lib/ddata.js:346:21)
    at Object.eval (eval at createFunctionContext (/home/jamen/.npm-global/lib/node_modules/dmd/node_modules/stream-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:221:23), <anonymous>:5:88)
    at Object.prog [as inverse] (/home/jamen/.npm-global/lib/node_modules/dmd/node_modules/stream-handlebars/node_modules/handlebars/dist/cjs/handlebars/runtime.js:193:15)
    at Object.<anonymous> (/home/jamen/.npm-global/lib/node_modules/dmd/node_modules/stream-handlebars/node_modules/handlebars/dist/cjs/handlebars/base.js:203:22)
    at Object.eval (eval at createFunctionContext (/home/jamen/.npm-global/lib/node_modules/dmd/node_modules/stream-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:221:23), <anonymous>:6:32)
    at ret (/home/jamen/.npm-global/lib/node_modules/dmd/node_modules/stream-handlebars/node_modules/handlebars/dist/cjs/handlebars/runtime.js:159:30)
    at ret (/home/jamen/.npm-global/lib/node_modules/dmd/node_modules/stream-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:488:21)
    at Object.invokePartial (/home/jamen/.npm-global/lib/node_modules/dmd/node_modules/stream-handlebars/node_modules/handlebars/dist/cjs/handlebars/runtime.js:218:12)

Here is a gist of the json-parse string being passed in: https://gist.github.com/jamen/df318f2b5f601dfe3a5c

Here are the files being passed in: https://github.com/jamen/craze/tree/b620698eff7fffdd02cf08eb08ffdefaf0ab8828/src/tokens


This issues follows in jsdoc-to-markdown. I just thought I might post it here, since the issue seems to be originating with dmd.

75lb commented 8 years ago

this is fixed and released in ddata@0.1.23, which is a part of dmd.. please update dmd or your jsdoc2md tool/plugin to pick up the fix..

you might notice there is still an issue with subclass method links, will sort this soon.

thanks for the report!