Skip to content

Commit 63e4db7

Browse files
committed
Do a case insensitive compare
1 parent be42bff commit 63e4db7

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/razor/src/document/razorDocumentManager.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,9 @@ export class RazorDocumentManager implements IRazorDocumentManager {
230230
return this.razorDocuments[path];
231231
}
232232

233-
const lowerCasePath = path.toLowerCase();
234-
const key = Object.keys(this.razorDocuments).find(
235-
(documentPath) => documentPath.toLowerCase() === lowerCasePath
233+
return Object.values(this.razorDocuments).find(
234+
(document) => document.path.localeCompare(path, undefined, { sensitivity: 'base' }) === 0
236235
);
237-
if (key) {
238-
return this.razorDocuments[key];
239-
}
240-
241-
return undefined;
242236
}
243237

244238
private async updateCSharpBuffer(updateBufferRequest: UpdateBufferRequest) {

0 commit comments

Comments
 (0)