Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using with Express 3.x #14

Closed
SlashmanX opened this issue Jun 19, 2012 · 5 comments
Closed

Using with Express 3.x #14

SlashmanX opened this issue Jun 19, 2012 · 5 comments

Comments

@SlashmanX
Copy link

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

@serby
Copy link
Owner

serby commented Jun 19, 2012

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:
#14

paul.serby@clock.co.uk
Chief Technology Officer

Direct: +44 2030 516115__Mobile: +44 7881 550999
*

*

@SlashmanX
Copy link
Author

I don't believe so. As you can see at the Express Wiki , app.locals is a new feature.

@bengourley
Copy link
Contributor

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.

@serby
Copy link
Owner

serby commented Jun 19, 2012

@bengourley definitely. Feature detection, rather than version detection.

 locals = app.helpers || app.locals;
 if (locals === undefined) {
   // error
 }

bengourley added a commit to bengourley/compact that referenced this issue Jul 5, 2012
@serby
Copy link
Owner

serby commented Jul 7, 2012

This should be fixed now

@serby serby closed this as completed Jul 7, 2012
serby pushed a commit that referenced this issue Jul 7, 2012
Support for Express 2.x and 3.x (fixes #14), also fixes #10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants