Skip to content

Commit

Permalink
style: Use fat arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelastic committed Sep 15, 2015
1 parent cf6a83c commit ab47b13
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ function renderTemplate({template, templateHelpers, data}) {
// `render` to get the rendered value, not the literal `{{value}}`. But
// this is currently broken (see
// https://github.com/twitter/hogan.js/issues/222).
forEach(templateHelpers, function(method, name) {
data['_' + name] = function() {
return function(value) {
data.helpers = {};
forEach(templateHelpers, (method, name) => {
data.helpers[name] = () => {
return (value) => {
return method(hogan.compile(value).render(data));
};
};
});
content = hogan.compile(this.props.template).render(data);
content = hogan.compile(template).render(data);
}

return content;
Expand Down

0 comments on commit ab47b13

Please sign in to comment.