From fdf5b92632025834048a3893c57991fb99c02941 Mon Sep 17 00:00:00 2001 From: Mark Wiemer Date: Mon, 28 Oct 2024 20:10:00 -0700 Subject: [PATCH] Cleanup workFolder check in tryGetFileLink --- src/providers/defProvider.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/providers/defProvider.ts b/src/providers/defProvider.ts index e58762e9..59a2198f 100644 --- a/src/providers/defProvider.ts +++ b/src/providers/defProvider.ts @@ -106,12 +106,9 @@ export class DefProvider implements vscode.DefinitionProvider { if (!includeMatch) { return undefined; } - const parent = workFolder - ? workFolder - : document.uri.path.substring( - 0, - document.uri.path.lastIndexOf('/'), - ); + const parent = + workFolder || + document.uri.path.substring(0, document.uri.path.lastIndexOf('/')); const targetPath = vscode.Uri.file( includeMatch[0] .trim()