-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Templates broken in 1.7 #1928
Comments
According 1.7 changelog: "Underscore templates no longer accept an initial data object. _.template always returns a function now". So this is the change without backward compatibility. |
Right. Isn't that a terrible idea? What if someone has server side templating with node.js and they unwittingly update to underscore 1.7? They are screwed. Why not just check whether an object is a settings object or a data object based on what keys the object has? |
It wasn't a question of how to work around the issue. I am actually embracing the change. Without considering all of the code this breaks, from a performance and API perspective it makes sense. It was just a rude surprise to update my node server and have my email templates stop working. Thanks for pointing out the other issue threads. I enjoyed reading the discussions. |
And I thought if there was one js library I wound't have compatibility problems would be underscore.... and in a minor version !!! there are no excuses for this... :( |
It seems like the API for templates changed. Not sure if that is considered a feature, but I would consider it a bug as it breaks everything I have ever done with underscore templates.
The issue is that I can no longer pass in data and get the rendered template back. It now returns a function instead of a string.
The text was updated successfully, but these errors were encountered: