From 81d298dc6beeff68151ba6ff38cbd9caedacfdb9 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Tue, 28 Jul 2015 12:45:51 +0100 Subject: [PATCH] chore(doc-gen): fix when decorator has no argument list --- docs/typescript-package/processors/readTypeScriptModules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/typescript-package/processors/readTypeScriptModules.js b/docs/typescript-package/processors/readTypeScriptModules.js index 317dec63a8..cadb1d8fbf 100644 --- a/docs/typescript-package/processors/readTypeScriptModules.js +++ b/docs/typescript-package/processors/readTypeScriptModules.js @@ -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(); })