This commit is contained in:
Konrad Pabjan 2020-07-09 16:51:40 +02:00
parent 9ee6dab9c2
commit 596040d10f
2 changed files with 6 additions and 6 deletions

View file

@ -67,11 +67,11 @@ function getMultiPathLCA(searchPaths: string[]): string {
// Loop over all the search paths until there is a non-common ancestor or we go out of bounds
while (splitIndex < smallestPathLength) {
if (!isPathTheSame()) {
// if all are the same, add to the end result & increment the index
commonPaths.push(splitPaths[0][splitIndex])
splitIndex++
break
}
// if all are the same, add to the end result & increment the index
commonPaths.push(splitPaths[0][splitIndex])
splitIndex++
}
return path.join(...commonPaths)
}