File tree 1 file changed +12
-8
lines changed
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -329,11 +329,13 @@ namespace ts.server {
329
329
const seen = createDocumentSpanSet ( ) ;
330
330
331
331
perProjectResults . forEach ( ( projectResults , project ) => {
332
- for ( const result of projectResults ) {
333
- // If there's a mapped location, it'll appear in the results for another project
334
- if ( ! seen . has ( result ) && ! getMappedLocationForProject ( documentSpanLocation ( result ) , project ) ) {
335
- results . push ( result ) ;
336
- seen . add ( result ) ;
332
+ if ( projectResults ) {
333
+ for ( const result of projectResults ) {
334
+ // If there's a mapped location, it'll appear in the results for another project
335
+ if ( ! seen . has ( result ) && ! getMappedLocationForProject ( documentSpanLocation ( result ) , project ) ) {
336
+ results . push ( result ) ;
337
+ seen . add ( result ) ;
338
+ }
337
339
}
338
340
}
339
341
} ) ;
@@ -383,9 +385,11 @@ namespace ts.server {
383
385
if ( defaultProjectResults ?. [ 0 ] . references [ 0 ] ?. isDefinition === undefined ) {
384
386
// Clear all isDefinition properties
385
387
perProjectResults . forEach ( projectResults => {
386
- for ( const referencedSymbol of projectResults ) {
387
- for ( const ref of referencedSymbol . references ) {
388
- delete ref . isDefinition ;
388
+ if ( projectResults ) {
389
+ for ( const referencedSymbol of projectResults ) {
390
+ for ( const ref of referencedSymbol . references ) {
391
+ delete ref . isDefinition ;
392
+ }
389
393
}
390
394
}
391
395
} ) ;
You can’t perform that action at this time.
0 commit comments