diff --git a/lib/express-flash.js b/lib/express-flash.js index ec1c80c..c549a07 100644 --- a/lib/express-flash.js +++ b/lib/express-flash.js @@ -8,7 +8,7 @@ * Module Dependencies */ -var connectFlash = require('connect-flash')(); +var connectFlash = require('connect-flash'); /** * Return a middleware function @@ -16,10 +16,10 @@ var connectFlash = require('connect-flash')(); * @return {Function} middleware function * @api public */ -exports = module.exports = function () { +exports = module.exports = function (options) { return function (req, res, next) { - connectFlash(req, res, function () { + connectFlash(options)(req, res, function () { // Proxy the render function so that the flash is // retrieved right before the render function is executed var render = res.render; diff --git a/package.json b/package.json index c829a1e..8fb15c4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-flash", - "version": "0.0.2", + "version": "0.0.3", "description": "Flash Messages for your Express Application", "homepage": "https://github.com/RGBboy/express-flash", "keywords": ["express", "flash", "messages"],