From d18aba0254e78991062437f22d9819eefeadeafe Mon Sep 17 00:00:00 2001 From: Fardin Koochaki Date: Sun, 20 Aug 2017 14:20:49 +0430 Subject: [PATCH] Name the middleware This prevents the `` layer name in the express stack. --- lib/express-flash.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/express-flash.js b/lib/express-flash.js index ec1c80c..58e06d3 100644 --- a/lib/express-flash.js +++ b/lib/express-flash.js @@ -18,7 +18,7 @@ var connectFlash = require('connect-flash')(); */ exports = module.exports = function () { - return function (req, res, next) { + return function expressFlash(req, res, next) { connectFlash(req, res, function () { // Proxy the render function so that the flash is // retrieved right before the render function is executed @@ -38,4 +38,4 @@ exports = module.exports = function () { * Library version. */ -exports.version = '0.0.2'; \ No newline at end of file +exports.version = '0.0.2';