Merge pull request #13487 from storybookjs/13472-fix-angular-without-compodoc

Addon-docs: Fix angular without compodoc
This commit is contained in:
Michael Shilman 2020-12-20 19:20:13 +08:00 committed by GitHub
commit 9de7de9577
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,6 +91,9 @@ const getComponentData = (component: Component | Directive) => {
}
checkValidComponentOrDirective(component);
const compodocJson = getCompodocJson();
if (!compodocJson) {
return null;
}
checkValidCompodocJson(compodocJson);
const { name } = component;
const metadata = findComponentByName(name, compodocJson);