Skip to content

Commit 58af642

Browse files
committed
Fix CSP files not being included in server side search results
Bug with the expected value of "projects". This was leading to projectList being undefined and throwing an error. Earlier logic to populate projectList uses if (project) {, so using if (project && ... here keeps the checks consistent. isfsConfig() defaults project to "", which is why it is in this state. The following logic is used if apiVersion >= 6, which Cache is not: project: project ? project : undefined, // Needs to be undefined if project is an empty string. This means special handling is needed in this case
1 parent 27c8366 commit 58af642

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/FileSystemProvider/TextSearchProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ export class TextSearchProvider implements vscode.TextSearchProvider {
676676
if (token.isCancellationRequested) {
677677
return;
678678
}
679-
if (project != undefined && file.doc.includes("/")) {
679+
if (project && file.doc.includes("/")) {
680680
// Check if this web app file is in the project
681681
if (!projectList.includes(file.doc.slice(1))) {
682682
// This web app file isn't in the project, so ignore its matches

0 commit comments

Comments
 (0)