mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-13 11:46:08 -05:00
* Port #48978 forward to the revised FAR code The old regression test didn't catch the corresponding bug in the new code because it hit the fast path where there's only a single project. * Drop spurious non-null assertion
This commit is contained in:
@@ -379,8 +379,8 @@ namespace ts.server {
|
||||
// have started the other project searches from related symbols. Propagate the
|
||||
// correct results to all other projects.
|
||||
|
||||
const defaultProjectResults = perProjectResults.get(defaultProject)!;
|
||||
if (defaultProjectResults[0].references[0].isDefinition === undefined) {
|
||||
const defaultProjectResults = perProjectResults.get(defaultProject);
|
||||
if (defaultProjectResults?.[0].references[0]?.isDefinition === undefined) {
|
||||
// Clear all isDefinition properties
|
||||
perProjectResults.forEach(projectResults => {
|
||||
for (const referencedSymbol of projectResults) {
|
||||
@@ -580,7 +580,6 @@ namespace ts.server {
|
||||
|
||||
return resultsMap;
|
||||
|
||||
// May enqueue to otherPositionQueue
|
||||
function searchPosition(project: Project, location: DocumentPosition): readonly TResult[] | undefined {
|
||||
const projectResults = getResultsForPosition(project, location);
|
||||
if (!projectResults) return undefined;
|
||||
|
||||
Reference in New Issue
Block a user