Fix unwanted constant comparisons potentially causing bugs (#61655)

This commit is contained in:
Ulrich Stark
2025-05-09 15:20:44 -07:00
committed by GitHub
parent 0ee67b517f
commit 7156300cee
8 changed files with 718 additions and 718 deletions
+1 -1
View File
@@ -324,7 +324,7 @@ export function canWatchAtTypes(atTypes: Path): boolean {
}
function isInDirectoryPath(dirComponents: Readonly<PathPathComponents>, fileOrDirComponents: Readonly<PathPathComponents>) {
if (fileOrDirComponents.length < fileOrDirComponents.length) return false;
if (fileOrDirComponents.length < dirComponents.length) return false;
for (let i = 0; i < dirComponents.length; i++) {
if (fileOrDirComponents[i] !== dirComponents[i]) return false;
}