Skip to content

Commit 3359a2e

Browse files
Fix a sonarcloud warning.
1 parent 364e793 commit 3359a2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/client/pythonEnvironments/base/locatorUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export function getQueryFilter(query: PythonLocatorQuery): (env: PythonEnvInfo)
4444
return query.searchLocations === undefined;
4545
}
4646
// Check against the requested roots.
47-
return locationFilters.some((filter) => filter(env.searchLocation!));
47+
const loc = env.searchLocation;
48+
return locationFilters.some((filter) => filter(loc));
4849
}
4950
}
5051
return (env) => {

0 commit comments

Comments
 (0)