Skip to content

Commit

Permalink
Merge pull request #16524 from KMathyTech/fix/extractEnumValues-undef…
Browse files Browse the repository at this point in the history
…ined-error

Addon-docs/Angular: fix extractEnumValues undefined error
  • Loading branch information
shilman authored Nov 17, 2021
2 parents 32c7e7f + 0a2dbfe commit 36c1e6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/docs/src/frameworks/angular/compodoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const extractTypeFromValue = (defaultValue: any) => {

const extractEnumValues = (compodocType: any) => {
const compodocJson = getCompodocJson();
const enumType = compodocJson?.miscellaneous.enumerations.find((x) => x.name === compodocType);
const enumType = compodocJson?.miscellaneous?.enumerations?.find((x) => x.name === compodocType);

if (enumType?.childs.every((x) => x.value)) {
return enumType.childs.map((x) => x.value);
Expand Down

0 comments on commit 36c1e6a

Please sign in to comment.