chore(doc-gen): fix when decorator has no argument list

This commit is contained in:
Peter Bacon Darwin 2015-07-28 12:45:51 +01:00
parent 35597a8349
commit 81d298dc6b
1 changed files with 1 additions and 1 deletions

View File

@ -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();
})