Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

#4326 - TypeError: Cannot read property 'param' of undefined #4895

Merged
merged 7 commits into from Dec 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/rules/completed-docs/tagExclusion.ts
Expand Up @@ -49,6 +49,10 @@ export class TagExclusion extends Exclusion<ITagExclusionDescriptor> {
return true;
}

if (this.contentTags === undefined) {
return false;
}

const matcherBody = this.contentTags[tagWithContent[0]];
if (matcherBody === undefined) {
continue;
Expand Down
5 changes: 5 additions & 0 deletions test/rules/completed-docs/defaults/edge-case/test.ts.lint
@@ -0,0 +1,5 @@
/**
* Snippet where no error occurs (But completed-docs correctly gives an error on the lack of jsdoc).
* @returns {Promise<Object>}
*/
export const handler = async () => { ... }
13 changes: 13 additions & 0 deletions test/rules/completed-docs/defaults/edge-case/tslint.json
@@ -0,0 +1,13 @@
{
"rules": {
"completed-docs": [
true,
{
"variables": {
"visibilities": ["exported"],
"tags": { "existence": [""] }
}
}
]
}
}