Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Aug 3, 2022
1 parent 08c4231 commit 2f18165
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/renderers/vue/src/docs/extractArgTypes.ts
Expand Up @@ -11,9 +11,11 @@ const SECTIONS = ['props', 'events', 'slots', 'methods'];
function isEnum(propDef: PropDef, docgenInfo: DocgenInfo): false | PropDef {
// cast as any, since "values" doesn't exist in DocgenInfo type
const { type, values } = docgenInfo as any;
const matched = Array.isArray(values) && values.length && type && type.name !== 'enum';
const matched = Array.isArray(values) && values.length && type?.name !== 'enum';

if (!matched) return false;
if (!matched) {
return false;
}

const enumString = values.join(', ');
let { summary } = propDef.type;
Expand Down

0 comments on commit 2f18165

Please sign in to comment.