Skip to content

Commit

Permalink
move function declaration outside of conditional block
Browse files Browse the repository at this point in the history
this fixes a JSHint error that cannot be suppressed.
  • Loading branch information
hegemonic committed Jul 4, 2012
1 parent da39bdd commit 356ac2a
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,20 @@ function installPlugins(plugins, p) {
}
}

function indexAll(docs) {
var lookupTable = {},
hasOwnProp = Object.prototype.hasOwnProperty;

docs.forEach(function(doc) {
if ( !hasOwnProp.call(lookupTable, doc.longname) ) {
lookupTable[doc.longname] = [];
}
lookupTable[doc.longname].push(doc);
});
docs.index = lookupTable;
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//


Expand Down Expand Up @@ -271,19 +285,6 @@ function main() {
packageDocs.files = sourceFiles || [];
docs.push(packageDocs);

function indexAll(docs) {
var lookupTable = {},
hasOwnProp = Object.prototype.hasOwnProperty;

docs.forEach(function(doc) {
if ( !hasOwnProp.call(lookupTable, doc.longname) ) {
lookupTable[doc.longname] = [];
}
lookupTable[doc.longname].push(doc);
});
docs.index = lookupTable;
}

indexAll(docs);

require('jsdoc/augment').addInherited(docs);
Expand Down

0 comments on commit 356ac2a

Please sign in to comment.