Skip to content

Commit

Permalink
Fix reference error in convert method of OutlineAdapter
Browse files Browse the repository at this point in the history
As the result object is about to be created, it can not be referred to when
mapping child items.

This fixes microsoft#3923
  • Loading branch information
kisstkondoros committed Apr 20, 2023
1 parent 8270c45 commit c270d67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/language/typescript/languageFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ export class OutlineAdapter extends Adapter implements languages.DocumentSymbolP
range: this._textSpanToRange(model, item.spans[0]),
selectionRange: this._textSpanToRange(model, item.spans[0]),
tags: [],
children: item.childItems?.map((child) => convert(child, result.name)),
children: item.childItems?.map((child) => convert(child, item.text)),
containerName: containerLabel
};
return result;
Expand Down

0 comments on commit c270d67

Please sign in to comment.