Skip to content

Commit 7fb2210

Browse files
committed
fix npe in hasToIgnoreCase (for microsoft#55916)
1 parent a4b6773 commit 7fb2210

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/vs/base/common/resources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function getComparisonKey(resource: URI): string {
1818
export function hasToIgnoreCase(resource: URI): boolean {
1919
// A file scheme resource is in the same platform as code, so ignore case for non linux platforms
2020
// Resource can be from another platform. Lowering the case as an hack. Should come from File system provider
21-
return resource.scheme === Schemas.file ? !isLinux : true;
21+
return resource && resource.scheme === Schemas.file ? !isLinux : true;
2222
}
2323

2424
export function basenameOrAuthority(resource: URI): string {

0 commit comments

Comments
 (0)