webdoc-labs / webdoc

Documentation generator for the web
https://www.webdoclabs.com
Other
79 stars 9 forks source link

crashed when @returns doesn't have type #104

Closed stepancar closed 2 years ago

stepancar commented 3 years ago

If @returns annotation doesn't have type it crashes with this error

(node:29113) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'dataType' of undefined
    at mergeReturns (/project/node_modules/@webdoc/parser/lib/transformer/merge-returns.js:13:

According https://jsdoc.app/tags-returns.html it is optional

ShukantPal commented 3 years ago

Oops 👀. I'll try to fix this over the weekend

ShukantPal commented 3 years ago

Were you running this on JavaScript files?

ShukantPal commented 3 years ago

I can't reproduce this on my unit test :(

stepancar commented 3 years ago

@SukantPal , could you please try '.js' file