Skip to content

Commit d891e4f

Browse files
authored
Check for identifier before obtaining text of name (#1984)
1 parent 179ff49 commit d891e4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/checker/checker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30385,7 +30385,7 @@ func (c *Checker) getSymbolAtLocation(node *ast.Node, ignoreErrors bool) *ast.Sy
3038530385
} else if ast.IsJSDocParameterTag(parent) && parent.Name() == node {
3038630386
if fn := ast.GetNodeAtPosition(ast.GetSourceFileOfNode(node), node.Pos(), false); fn != nil && ast.IsFunctionLike(fn) {
3038730387
for _, param := range fn.Parameters() {
30388-
if param.Name().Text() == node.Text() {
30388+
if ast.IsIdentifier(param.Name()) && param.Name().Text() == node.Text() {
3038930389
return c.getSymbolOfNode(param)
3039030390
}
3039130391
}

0 commit comments

Comments
 (0)