removing underscore dependency in locals middleware

This commit is contained in:
Simon Martín 2017-11-15 16:56:21 +01:00
parent c0df0d12c6
commit 667b2a9cb1

View File

@ -1,8 +1,6 @@
const _ = require('underscore');
module.exports = function localsMiddleware(req, res, next) {
_.defaults(res.locals, req.params);
// save req.params in res.locals
res.locals = Object.assign(req.params || {}, res.locals);
next();
};