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

Limit options passed from render methods to helper methods #2

Closed
ericf opened this issue Jan 10, 2013 · 0 comments
Closed

Limit options passed from render methods to helper methods #2

ericf opened this issue Jan 10, 2013 · 0 comments
Labels

Comments

@ericf
Copy link
Owner

ericf commented Jan 10, 2013

The render() and renderView() methods should not simply pass the options they receive from the caller along to the helper methods they call.

The following doesn't make sense and will break:

app.get('/', function (req, res, next) {
    res.render('home', {
        precompiled: true
    });
});

This will end up calling getPartials() and getTemplate() with options.precompiled = true, and throw an error.

@ericf ericf closed this as completed in 9c1942a Feb 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant