Permalink
Browse files

fix --api when ctx is missing

  • Loading branch information...
1 parent 63052da commit 59ba3e520390f1c302c8a9b927e1192e55513aee @tj committed Oct 1, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/api.js
View
1 lib/api.js
@@ -7,6 +7,7 @@ module.exports = function(comments){
if (comment.ignore) return;
var ctx = comment.ctx;
var desc = comment.description;
+ if (!ctx) return;
if (!ctx.string.indexOf('module.exports')) return;
buf.push('## ' + ctx.string.replace('.prototype.', '#'));
buf.push('');

0 comments on commit 59ba3e5

Please sign in to comment.