chore(doc-gen): stop crash in `gulp public_docs`

This change prevents the doc generation from crashing due to a missing module,
but perhaps we need to think of a way of being able to generate the angular.d.ts
file correctly in `gulp public_docs`, perhaps by removing the need for
angular2/angular2.api
This commit is contained in:
Peter Bacon Darwin 2015-07-04 08:47:13 +01:00 committed by Alex Eagle
parent 72257ec87d
commit 0e945e465d
1 changed files with 4 additions and 3 deletions

View File

@ -66,12 +66,13 @@ module.exports = function createTypeDefinitionFile(log) {
_.forEach(doc.moduleDocs, function(modDoc, alias) {
if (!modDoc.doc) {
log.error('createTypeDefinitionFile processor: no such module "' + alias + '" (Did you forget to add it to the modules to load?)');
doc = null;
}
});
if (doc) {
docs.push(doc);
}
});
// Add all the type definition docs to the docs collection so that dgeni can process them
return docs.concat(typeDefDocs);
}
};
};