Add utitlity for stringContains

This commit is contained in:
Sheetal Nandi
2017-10-10 17:08:47 -07:00
parent aa22c56282
commit e30a66d22f
12 changed files with 18 additions and 15 deletions
+1 -2
View File
@@ -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)) {