mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
possible fix for path.commonPrefix issue (#330)
This commit is contained in:
parent
f09ef82246
commit
a8d7cd5bdf
@ -16,9 +16,9 @@ function prefixReducer(previousPath, current) {
|
|||||||
return currentPath;
|
return currentPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
currentPath = path.resolve( process.cwd(), path.dirname(current) ).split(path.sep);
|
currentPath = path.resolve( process.cwd(), path.dirname(current) ).split(path.sep) || [];
|
||||||
|
|
||||||
if (previousPath) {
|
if (previousPath && currentPath.length) {
|
||||||
// remove chunks that exceed the previous path's length
|
// remove chunks that exceed the previous path's length
|
||||||
currentPath = currentPath.slice(0, previousPath.length);
|
currentPath = currentPath.slice(0, previousPath.length);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user