From 4c8fa353245b9c32261860caff18f002d294e19f Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Tue, 5 Nov 2013 21:16:52 +0000 Subject: [PATCH] fix(ngdocs): `shortDescription()` should not error if no `description` --- docs/src/ngdoc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js index 396b41ad321c..17ea1fa89fa2 100644 --- a/docs/src/ngdoc.js +++ b/docs/src/ngdoc.js @@ -214,6 +214,7 @@ Doc.prototype = { }, shortDescription : function() { + if (!this.description) return this.description; var text = this.description.split("\n")[0]; text = text.replace(/<.+?\/?>/g, ''); text = text.replace(/{/g,'{');