Skip to content

Commit 83b49d3

Browse files
edrioukCopilot
andauthored
Update src/solutions/language-features/reference-link-provider.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 96b2485 commit 83b49d3

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/solutions/language-features/reference-link-provider.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,15 @@ export class ReferenceLinkProvider implements DocumentLinkProvider<DocumentLink>
5858
if (!tag || !this.getReferenceItemTags().includes(tag)) {
5959
return false;
6060
}
61-
// in case of cbuild-ids.yml we can only expand links under 'cbuilds' section
62-
if (tag === 'clayer' && !item.getParent('cbuilds')) {
63-
return false;
64-
}
65-
// in case of cbuild-ids.yml 'project' under 'cbuilds' is just a name, not path
66-
if (tag === 'project' && !!item.getParent('cbuilds')) {
67-
return false;
61+
if (this.cbuildFile) {
62+
// in case of cbuild-ids.yml we can only expand links under 'cbuilds' section
63+
if (tag === 'clayer' && !item.getParent('cbuilds')) {
64+
return false;
65+
}
66+
// in case of cbuild-ids.yml 'project' under 'cbuilds' is just a name, not path
67+
if (tag === 'project' && !!item.getParent('cbuilds')) {
68+
return false;
69+
}
6870
}
6971
return true;
7072
}

0 commit comments

Comments
 (0)