ericf / express-handlebars

A Handlebars view engine for Express which doesn't suck.
BSD 3-Clause "New" or "Revised" License
2.31k stars 384 forks source link

Limit options passed from render methods to helper methods #2

Closed ericf closed 11 years ago

ericf commented 11 years ago

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.