diff --git a/src/plugins/render.js b/src/plugins/render.js index ba31a15..0a2f591 100644 --- a/src/plugins/render.js +++ b/src/plugins/render.js @@ -177,11 +177,10 @@ function createRender(comments, fp) { output.push('**Params**'); comment.params.forEach((param) => { const name = param.isOptional ? `[${param.name}]` : param.name; - const { type } = param.type; let str = param.type.name; - if (!str && type.type === 'UnionType') { - str = type.elements.map((x) => x.name).join('|'); + if (!str && param.type.type === 'UnionType') { + str = param.type.elements.map((x) => x.name).join('|'); } output.push(