Skip to content

Commit

Permalink
fix: undefined in getCommentsBefore
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless committed Feb 21, 2022
1 parent b1de945 commit e98b0f5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const requireFormlyCodeDocumentationRule: TSESLint.RuleModule<string, []>
function hasPrecedingComment(node: TSESTree.ClassDeclaration) {
return (
context.getSourceCode().getCommentsBefore(node)?.length > 0 ||
context.getSourceCode().getCommentsBefore(node.decorators?.[0])?.length > 0
(node.decorators?.[0] && context.getSourceCode().getCommentsBefore(node.decorators[0])?.length > 0)
);
}
if (!context.getFilename().includes('formly')) {
Expand Down

1 comment on commit e98b0f5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Azure Demo Servers are available:

Please sign in to comment.