Skip to content

Commit 0e945e4

Browse files
petebacondarwinalexeagle
authored andcommitted
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
1 parent 72257ec commit 0e945e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/dgeni-package/processors/createTypeDefinitionFile.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ module.exports = function createTypeDefinitionFile(log) {
6666
_.forEach(doc.moduleDocs, function(modDoc, alias) {
6767
if (!modDoc.doc) {
6868
log.error('createTypeDefinitionFile processor: no such module "' + alias + '" (Did you forget to add it to the modules to load?)');
69+
doc = null;
6970
}
7071
});
72+
if (doc) {
73+
docs.push(doc);
74+
}
7175
});
72-
73-
// Add all the type definition docs to the docs collection so that dgeni can process them
74-
return docs.concat(typeDefDocs);
7576
}
7677
};
7778
};

0 commit comments

Comments
 (0)