When attaching JSDoc diagnostics, make sure to only include diagnostics that actually belong with the JSDoc (#57271)

This commit is contained in:
Abraham Guo
2024-02-13 12:13:43 -08:00
committed by GitHub
parent a6414052a3
commit 0b044f729f
4 changed files with 46 additions and 1 deletions
+1 -1
View File
@@ -8760,7 +8760,7 @@ namespace Parser {
if (!jsDocDiagnostics) {
jsDocDiagnostics = [];
}
jsDocDiagnostics.push(...parseDiagnostics);
addRange(jsDocDiagnostics, parseDiagnostics, saveParseDiagnosticsLength);
}
currentToken = saveToken;
parseDiagnostics.length = saveParseDiagnosticsLength;