mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
chore(doc-gen): fix when decorator has no argument list
This commit is contained in:
parent
35597a8349
commit
81d298dc6b
1 changed files with 1 additions and 1 deletions
|
|
@ -250,7 +250,7 @@ module.exports = function readTypeScriptModules(tsParser, modules, getFileInfo,
|
|||
var decorators = declaration.decorators && declaration.decorators.map(function(decorator) {
|
||||
decorator = decorator.expression;
|
||||
return {
|
||||
name: decorator.expression.text,
|
||||
name: decorator.expression ? decorator.expression.text : decorator.text,
|
||||
arguments: decorator.arguments && decorator.arguments.map(function(argument) {
|
||||
return getText(sourceFile, argument).trim();
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue