Permalink
Browse files

ensure options

  • Loading branch information...
chjj committed Oct 17, 2011
1 parent c093150 commit 050b9ada1ad39bc152cf9f2042d26706857ffc26
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/index.js
View
@@ -19,9 +19,12 @@ var load = function(name) {
*/
exports = function(options) {
+ options = options || {};
+
// LEGACY
- if (typeof options === 'string')
+ if (typeof options === 'string') {
return new exports.multipart(arguments[0], arguments[1]);
+ }
return function(req, res, next) {
if (req.method === 'GET'

0 comments on commit 050b9ad

Please sign in to comment.