Skip to content

Commit 0a4103f

Browse files
committed
Fixed unexpected singleton require behavior
1 parent 8bb0e21 commit 0a4103f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,8 @@ JqueryFileUploadMiddleware.prototype.fileManager = function (options) {
5656
return require('./lib/filemanager')(this, this.prepareOptions(_.extend({}, this.options, options)));
5757
};
5858

59-
module.exports = new JqueryFileUploadMiddleware();
59+
module.exports = function(options) {
60+
var middleware = new JqueryFileUploadMiddleware();
61+
if (options) middleware.configure(options);
62+
return middleware;
63+
};

0 commit comments

Comments
 (0)