build(aio): do not try to auto-link to internal API items (#24000)

This would cause dangling links since the target, being internal,
would not exist in the docs.

PR Close #24000
This commit is contained in:
Pete Bacon Darwin
2018-05-16 17:41:32 +01:00
committed by Miško Hevery
parent 5fb0b567ce
commit 131d0d8e8a
2 changed files with 10 additions and 1 deletions

View File

@ -65,7 +65,9 @@ module.exports = function autoLinkCode(getDocFromAlias) {
};
}
function foundValidDoc(docs) {
return docs.length === 1 && autoLinkCodeImpl.docTypes.indexOf(docs[0].docType) !== -1;
return docs.length === 1 &&
!docs[0].internal &&
autoLinkCodeImpl.docTypes.indexOf(docs[0].docType) !== -1;
}
function createLinkNode(doc, text) {