From b19dfcf4aed99f6c3f50b0d0d72eed0c95c433cf Mon Sep 17 00:00:00 2001 From: Avi Gopal Date: Thu, 20 Jun 2024 15:31:41 -0700 Subject: [PATCH] fixed event handling interaction with stored problems --- ext-src/extension.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext-src/extension.ts b/ext-src/extension.ts index 6b35a91..9aaf264 100644 --- a/ext-src/extension.ts +++ b/ext-src/extension.ts @@ -350,7 +350,11 @@ export function activate(context: vscode.ExtensionContext): void { if (!e) { return; } - const { fileName } = Util.extractMetaDataFromDocument(e.document); + const { filePath, fileName } = Util.extractMetaDataFromDocument(e.document); + + if (!filePath) { + return; + } if (!fileName) { return; @@ -372,7 +376,7 @@ export function activate(context: vscode.ExtensionContext): void { return; } - const results: Problem[] | undefined = Util.getCurrentEditorProblems(analyzeValue, fileName); + const results: Problem[] | undefined = Util.getCurrentEditorProblems(analyzeValue, filePath); if (!results) { return; }