diff --git a/templates/default/publish.js b/templates/default/publish.js index 0938c161..44fb9d20 100644 --- a/templates/default/publish.js +++ b/templates/default/publish.js @@ -361,7 +361,9 @@ exports.publish = function(taffyData, opts, tutorials) { fs.copyFileSync(fileName, toDir); }); - sourceFiles = shortenPaths( sourceFiles, path.commonPrefix(sourceFilePaths) ); + if (sourceFilePaths.length) { + sourceFiles = shortenPaths( sourceFiles, path.commonPrefix(sourceFilePaths) ); + } data().each(function(doclet) { var url = helper.createLink(doclet); helper.registerLink(doclet.longname, url);