From 2224bee3be9b6e30af769a1176e0d4f1349efd29 Mon Sep 17 00:00:00 2001 From: Jeff Williams Date: Thu, 30 Oct 2014 12:19:47 -0700 Subject: [PATCH] do not try to normalize empty path strings Fixes build breakage on non-Windows platforms. --- lib/jsdoc/tag/dictionary/definitions.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/jsdoc/tag/dictionary/definitions.js b/lib/jsdoc/tag/dictionary/definitions.js index d862fca9..7911c239 100644 --- a/lib/jsdoc/tag/dictionary/definitions.js +++ b/lib/jsdoc/tag/dictionary/definitions.js @@ -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, '/'); }