mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
do not try to normalize empty path strings
Fixes build breakage on non-Windows platforms.
This commit is contained in:
parent
fc2b4ad3d2
commit
2224bee3be
@ -58,10 +58,9 @@ function filepathMinusPrefix(filepath) {
|
||||
var commonPrefix = path.commonPrefix(sourcePaths);
|
||||
var result = '';
|
||||
|
||||
filepath = path.normalize(filepath);
|
||||
|
||||
if (filepath) {
|
||||
// always use forward slashes
|
||||
filepath = path.normalize(filepath);
|
||||
// always use forward slashes in the result
|
||||
result = (filepath + path.sep).replace(commonPrefix, '')
|
||||
.replace(/\\/g, '/');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user