Closed SlashmanX closed 12 years ago
Thanks for the heads up. Will that also work in express 2.0?
On 19 June 2012 10:32, Eóin Martin < reply@reply.github.com
wrote:
Just a quick heads up that anyone wanting to use this on Express 3.x needs to change line 201 in compact.js as app.helpers are not used anymore. You simply have to change it to app.locals
I would create a pull request but it seems trivial for one simple word change
Reply to this email directly or view it on GitHub: https://github.com/serby/compact/issues/14
paul.serby@clock.co.uk Chief Technology Officer
_Direct: +44 2030 516115_Mobile: +44 7881 550999 *
I don't believe so. As you can see at the Express Wiki , app.locals is a new feature.
Might need to do a bit of feature detection, or ask app
what version of Express it is. We should address this with #10 which will be a big refactor.
@bengourley definitely. Feature detection, rather than version detection.
locals = app.helpers || app.locals;
if (locals === undefined) {
// error
}
This should be fixed now
Just a quick heads up that anyone wanting to use this on Express 3.x needs to change line 201 in compact.js as app.helpers are not used anymore. You simply have to change it to app.locals
I would create a pull request but it seems trivial for one simple word change