mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add utitlity for stringContains
This commit is contained in:
@@ -324,7 +324,7 @@ namespace ts {
|
||||
let dirPath = getDirectoryPath(failedLookupLocationPath);
|
||||
|
||||
// If directory path contains node module, get the most parent node_modules directory for watching
|
||||
while (dirPath.indexOf("/node_modules/") !== -1) {
|
||||
while (stringContains(dirPath, "/node_modules/")) {
|
||||
dir = getDirectoryPath(dir);
|
||||
dirPath = getDirectoryPath(dirPath);
|
||||
}
|
||||
@@ -334,7 +334,6 @@ namespace ts {
|
||||
return { dir, dirPath };
|
||||
}
|
||||
|
||||
|
||||
// Use some ancestor of the root directory
|
||||
if (rootPath !== undefined) {
|
||||
while (!isInDirectoryPath(dirPath, rootPath)) {
|
||||
|
||||
Reference in New Issue
Block a user