Skip to content

Commit 745fc13

Browse files
mgsiumadityasharad
andauthored
Update extensions/ql-vscode/src/extension.ts
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
1 parent 9ac5169 commit 745fc13

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extensions/ql-vscode/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ async function activateWithInstalledDistribution(
501501
selectedQuery: Uri
502502
): Promise<void> {
503503
// selectedQuery is unpopulated when executing through the command palette
504-
const pathToQhelp = selectedQuery ? selectedQuery.fsPath : window.activeTextEditor!.document.uri.fsPath;
504+
const pathToQhelp = selectedQuery ? selectedQuery.fsPath : window.activeTextEditor?.document.uri.fsPath;
505505
if(pathToQhelp) {
506506
// Create temporary directory
507507
const relativePathToMd = path.basename(pathToQhelp, '.qhelp') + '.md';

0 commit comments

Comments
 (0)