Skip to content

Commit

Permalink
fix issue #14828
Browse files Browse the repository at this point in the history
  • Loading branch information
saulodias committed Aug 20, 2021
1 parent 235f498 commit 1508807
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 1508807

Please sign in to comment.