From 672ba7f4799d0c9102b93bc25db991fcb6123c58 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Fri, 9 Sep 2016 10:16:11 +0100 Subject: [PATCH] fix(api-builder/linkDocs): don't crash if a doc has no fileInfo (#2296) Closes #2294 --- tools/api-builder/links-package/inline-tag-defs/linkDocs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/api-builder/links-package/inline-tag-defs/linkDocs.js b/tools/api-builder/links-package/inline-tag-defs/linkDocs.js index 6254fc2d2f..68bbeaede3 100644 --- a/tools/api-builder/links-package/inline-tag-defs/linkDocs.js +++ b/tools/api-builder/links-package/inline-tag-defs/linkDocs.js @@ -45,7 +45,8 @@ module.exports = function linkDocsInlineTagDef(parseArgString, createDocMessage, var vers = _self.vers; var prevUri = uri; uri = path.join(lang, vers, uri); - log.info('Ajusted linkDocs chapter-relative uri (' + doc.fileInfo.baseName + '): ' + prevUri + ' -> ' + uri); + var fileName = doc.fileInfo ? (' (' + doc.fileInfo.baseName + ')') : ''; + log.info('Ajusted linkDocs chapter-relative uri' + fileName + ': ' + prevUri + ' -> ' + uri); } var isValid = false;