We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 359930a commit 2c881fdCopy full SHA for 2c881fd
src/services/suggestionDiagnostics.ts
@@ -132,7 +132,7 @@ namespace ts {
132
// check that a property access expression exists in there and that it is a handler
133
const returnStatements = getReturnStatementsWithPromiseHandlers(node);
134
if (returnStatements.length > 0) {
135
- diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) ? node.parent.name : node, Diagnostics.This_may_be_converted_to_an_async_function));
+ diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) && !node.name ? node.parent.name : node, Diagnostics.This_may_be_converted_to_an_async_function));
136
}
137
138
0 commit comments