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

Support Handlebars.registerHelper() during render()? #11

Closed
ericf opened this issue Feb 18, 2013 · 0 comments
Closed

Support Handlebars.registerHelper() during render()? #11

ericf opened this issue Feb 18, 2013 · 0 comments

Comments

@ericf
Copy link
Owner

ericf commented Feb 18, 2013

Currently an ExpressHandlebars instance only accesses the Handlebars.helpers during instance creation. This means that any calls to Handlebars.registerHelper() that occur after the instance is created will not be used.

Support for using all helpers registered the Handlebars can be implemented by always merging: global, instance, and render level helpers before each call to render.

This seems like reasonable behavior and worth the performance tradeoff (merging should be fast), to gain the expected behavior that Handlebars.registerHelper() should work anytime it's called.

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

No branches or pull requests

1 participant