Skip to content

Conversation

@AlexNeises
Copy link

I would get an error when trying to generate header documentation. Removing the length check fixed the problem.

@softdevstory
Copy link
Owner

Thanks your codes.
I will review it. please give me time. :)

@softdevstory
Copy link
Owner

I tested by using examples.
There is an error.

$ node index.js -p examples -o output.md --template templates/default.md 
undefined:25
  throw err;
  ^

TypeError: ejs:44
    42| ### Header Examples
    43| 
 >> 44| <% data[group][sub][0].header.examples.forEach(function (example) { -%>
    45| ```json
    46| <%- example.content %>
    47| ```

Cannot read property 'length' of undefined
    at eval (eval at <anonymous> (/Users/developer/Softdevstory/Work/node-apidoc-markdown/node_modules/ejs/lib/ejs.js:237:14), <anonymous>:37:112)
    at Array.forEach (native)
    at eval (eval at <anonymous> (/Users/developer/Softdevstory/Work/node-apidoc-markdown/node_modules/ejs/lib/ejs.js:237:14), <anonymous>:30:962)
    at Array.forEach (native)
    at eval (eval at <anonymous> (/Users/developer/Softdevstory/Work/node-apidoc-markdown/node_modules/ejs/lib/ejs.js:237:14), <anonymous>:30:837)
    at eval (eval at <anonymous> (/Users/developer/Softdevstory/Work/node-apidoc-markdown/node_modules/ejs/lib/ejs.js:237:14), <anonymous>:48:19)
    at /Users/developer/Softdevstory/Work/node-apidoc-markdown/node_modules/ejs/lib/ejs.js:250:15
    at Object.<anonymous> (/Users/developer/Softdevstory/Work/node-apidoc-markdown/index.js:88:31)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants