Skip to content

Commit

Permalink
Merge pull request #15 from relvao/master
Browse files Browse the repository at this point in the history
Update index.js
  • Loading branch information
fliptoo committed Apr 21, 2014
2 parents df8cc90 + 6190d11 commit 61c3413
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/swagger-express/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ function parseJsDocs(file, fn) {
var fragments = js.match(regex);
var docs = [];

if (!fragments) {
fn(null, docs);
return;
}

for (var i = 0; i < fragments.length; i++) {
var fragment = fragments[i];
var doc = doctrine.parse(fragment, { unwrap: true });
Expand Down

0 comments on commit 61c3413

Please sign in to comment.