mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix unwanted constant comparisons potentially causing bugs (#61655)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user