Skip to content

Commit

Permalink
fix --api when ctx is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Oct 1, 2012
1 parent 63052da commit 59ba3e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/api.js
Expand Up @@ -7,6 +7,7 @@ module.exports = function(comments){
if (comment.ignore) return; if (comment.ignore) return;
var ctx = comment.ctx; var ctx = comment.ctx;
var desc = comment.description; var desc = comment.description;
if (!ctx) return;
if (!ctx.string.indexOf('module.exports')) return; if (!ctx.string.indexOf('module.exports')) return;
buf.push('## ' + ctx.string.replace('.prototype.', '#')); buf.push('## ' + ctx.string.replace('.prototype.', '#'));
buf.push(''); buf.push('');
Expand Down

0 comments on commit 59ba3e5

Please sign in to comment.