From 2b0664130873995386399f555178bec97f78d17a Mon Sep 17 00:00:00 2001 From: nicola Date: Wed, 6 Apr 2016 16:33:24 -0400 Subject: [PATCH] fixing #301 --- lib/handlers/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/handlers/index.js b/lib/handlers/index.js index 64739b111..4251346ea 100644 --- a/lib/handlers/index.js +++ b/lib/handlers/index.js @@ -23,7 +23,7 @@ function handler (req, res, next) { return res.redirect(301, path.join(req.path, '/')) } - if (requestedType.indexOf('text/html') !== 0) { + if (requestedType && requestedType.indexOf('text/html') !== 0) { return next() } debug('Looking for index in ' + req.path)