We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78e794c commit eec2f33Copy full SHA for eec2f33
1 file changed
extensions/ql-vscode/src/queries-panel/query-pack-discovery.ts
@@ -36,8 +36,13 @@ export class QueryPackDiscovery extends FilePathDiscovery<QueryPack> {
36
* or the pack's language is unknown.
37
*/
38
public getLanguageForQueryFile(queryPath: string): QueryLanguage | undefined {
39
+ const pathData = this.getPathData();
40
+ if (pathData === undefined) {
41
+ return undefined;
42
+ }
43
+
44
// Find all packs in a higher directory than the query
- const packs = (this.getPathData() || []).filter((queryPack) =>
45
+ const packs = pathData.filter((queryPack) =>
46
containsPath(dirname(queryPack.path), queryPath),
47
);
48
0 commit comments