We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ac5169 commit 745fc13Copy full SHA for 745fc13
1 file changed
extensions/ql-vscode/src/extension.ts
@@ -501,7 +501,7 @@ async function activateWithInstalledDistribution(
501
selectedQuery: Uri
502
): Promise<void> {
503
// selectedQuery is unpopulated when executing through the command palette
504
- const pathToQhelp = selectedQuery ? selectedQuery.fsPath : window.activeTextEditor!.document.uri.fsPath;
+ const pathToQhelp = selectedQuery ? selectedQuery.fsPath : window.activeTextEditor?.document.uri.fsPath;
505
if(pathToQhelp) {
506
// Create temporary directory
507
const relativePathToMd = path.basename(pathToQhelp, '.qhelp') + '.md';
0 commit comments