diff --git a/aio/tools/transforms/angular-api-package/processors/extractDecoratedClasses.js b/aio/tools/transforms/angular-api-package/processors/extractDecoratedClasses.js index e245b40987..1f9bf983bf 100644 --- a/aio/tools/transforms/angular-api-package/processors/extractDecoratedClasses.js +++ b/aio/tools/transforms/angular-api-package/processors/extractDecoratedClasses.js @@ -1,5 +1,3 @@ -var _ = require('lodash'); - module.exports = function extractDecoratedClassesProcessor(EXPORT_DOC_TYPES) { // Add the "directive" docType into those that can be exported from a module @@ -10,12 +8,9 @@ module.exports = function extractDecoratedClassesProcessor(EXPORT_DOC_TYPES) { $runBefore: ['docs-processed'], decoratorTypes: ['Directive', 'Component', 'Pipe', 'NgModule'], $process: function(docs) { - var decoratorTypes = this.decoratorTypes; - - _.forEach(docs, function(doc) { - - _.forEach(doc.decorators, function(decorator) { - + const decoratorTypes = this.decoratorTypes; + docs.forEach(doc => { + (doc.decorators || []).forEach(decorator => { if (decoratorTypes.indexOf(decorator.name) !== -1) { doc.docType = decorator.name.toLowerCase(); // Directives do not always have an argument (i.e. abstract directives).