softdevstory/node-apidoc-markdown

Exception building the markdown

saschak094 opened this issue · 0 comments

While building the markdown document with the apidoc generated files a exception occurs due to a missing if condition

  throw err;
  ^

TypeError: ejs:27
    25| 
    26| 	<%-: data[group][sub][0].type | upcase %> <%= data[group][sub][0].url %>
 >> 27| 
    28| <% if (data[group][sub][0].header && data[group][sub][0].header.fields.Header.length) { -%>
    29| ### Headers
    30| 

Cannot read property 'length' of undefined
    at eval (eval at exports.compile (/Users/sascha.kerbler/Documents/workspace/kfw-project/kfw-chain-api/node_modules/ejs/lib/ejs.js:237:14), <anonymous>:32:106)
    at Array.forEach (native)
    at eval (eval at exports.compile (/Users/sascha.kerbler/Documents/workspace/kfw-project/kfw-chain-api/node_modules/ejs/lib/ejs.js:237:14), <anonymous>:30:958)
    at Array.forEach (native)
    at eval (eval at exports.compile (/Users/sascha.kerbler/Documents/workspace/kfw-project/kfw-chain-api/node_modules/ejs/lib/ejs.js:237:14), <anonymous>:30:833)
    at eval (eval at exports.compile (/Users/sascha.kerbler/Documents/workspace/kfw-project/kfw-chain-api/node_modules/ejs/lib/ejs.js:237:14), <anonymous>:48:19)
    at /Users/sascha.kerbler/Documents/workspace/kfw-project/kfw-chain-api/node_modules/ejs/lib/ejs.js:250:15
    at Object.<anonymous> (/Users/sascha.kerbler/Documents/workspace/kfw-project/kfw-chain-api/node_modules/apidoc-markdown2/index.js:88:31)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
error Command failed with exit code 1.