Skip to content

Commit

Permalink
fix issue storybookjs#14828
Browse files Browse the repository at this point in the history
  • Loading branch information
Saulo Dias committed Aug 18, 2021
1 parent 1bf6f4e commit c252423
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -136,5 +136,14 @@ export const getComponentDecoratorMetadata = (component: any): Component | undef
? Reflect.getOwnPropertyDescriptor(component, decoratorKey).value
: component[decoratorKey];

return (decorators || []).find((d) => d instanceof Component);
if (!decorators) {
return (
component.decorators &&
component.decorators[0] &&
component.decorators[0].args &&
component.decorators[0].args[0]
);
}

return decorators.find((d) => d instanceof Component);
};

0 comments on commit c252423

Please sign in to comment.