Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(ngdocs): shortDescription() should not error if no description
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Nov 5, 2013
1 parent e196413 commit 4c8fa35
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/ngdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,'&#123;');
Expand Down

0 comments on commit 4c8fa35

Please sign in to comment.