Skip to content
Browse files

`formdiable()` now does the same thing as `new formidable`

  • Loading branch information...
1 parent e94f24e commit 6e5c78b8cd5fb67e2a012eba0707c18f0d45ff48 @substack substack committed with felixge Sep 5, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/formidable/incoming_form.js
View
3 lib/formidable/incoming_form.js
@@ -9,6 +9,7 @@ var sys = require('sys')
, EventEmitter = require('events').EventEmitter;
function IncomingForm() {
+ if (!(this instanceof IncomingForm)) return new IncomingForm;
EventEmitter.call(this);
this.error = null;
@@ -340,4 +341,4 @@ IncomingForm.prototype._maybeEnd = function() {
}
this.emit('end');
-};
+};

0 comments on commit 6e5c78b

Please sign in to comment.
Something went wrong with that request. Please try again.