Permalink
Browse files

Return the function, don't just create it.

  • Loading branch information...
isaacs
isaacs committed Dec 22, 2009
1 parent 008174f commit 641bd6cd688d59f5c3bf106de37ef20857397dce
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/auto-index.js
View
@@ -5,7 +5,7 @@ exports.autoIndex = function autoIndexFactory (docroot, indexIgnore) {
indexIgnore = indexIgnore || [];
if (!docroot) throw new Error("Need docroot config for autoIndex.");
- function autoIndex () {
+ return function autoIndex () {
var conf = this.server.conf,
dir = path.join(docroot, this.req.uri.path),
self = this,

0 comments on commit 641bd6c

Please sign in to comment.