Skip to content

Commit 1fbf399

Browse files
committed
Fix: Avoid error for check-syntax when tags not present
1 parent 49af10a commit 1fbf399

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/rules/checkSyntax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default iterateJsdoc(({
44
jsdoc,
55
report
66
}) => {
7-
if (!jsdoc.tags.length) {
7+
if (!jsdoc.tags) {
88
return;
99
}
1010

test/rules/assertions/checkSyntax.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ export default {
2424
*/
2525
function quux (foo) {
2626
27+
}
28+
`
29+
},
30+
{
31+
code: `
32+
/**
33+
*
34+
*/
35+
function quux (foo) {
36+
2737
}
2838
`
2939
}

0 commit comments

Comments
 (0)