Skip to content

Commit

Permalink
fix: LG goto definition lost some cross files definitions (#7203)
Browse files Browse the repository at this point in the history
* fix lg goto missing

* remove log

Co-authored-by: Chris Whitten <[email protected]>
  • Loading branch information
cosmicshuai and cwhitten authored Apr 21, 2021
1 parent 1a3ce88 commit af2c42a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,11 @@ export class LGServer {
const curLocale = this.getLocale(fileId);
const fileIdWitoutLocale = this.removeLocaleInId(fileId);
const lgTextFiles = projectId ? this.getLgResources(projectId) : [];
this._templateDefinitions = {};
for (const file of lgTextFiles) {
//Only stroe templates in other LG files
if (this.removeLocaleInId(file.id) !== fileIdWitoutLocale && this.getLocale(file.id) === curLocale) {
const lgTemplates = await this._lgParser.parse(file.id, file.content, lgTextFiles);
this._templateDefinitions = {};
for (const template of lgTemplates.templates) {
this._templateDefinitions[template.name] = {
fileId: file.id,
Expand Down

0 comments on commit af2c42a

Please sign in to comment.