Skip to content

Commit

Permalink
Have {{each}} helper set up one-way bindings. This avoids potential c…
Browse files Browse the repository at this point in the history
…yclic bindings and is faster.
  • Loading branch information
tomhuda committed May 16, 2011
1 parent 5ea01a9 commit af32c22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/sproutcore-handlebars/lib/helpers/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Handlebars.registerHelper('collection', function(path, options) {
*/
Handlebars.registerHelper('each', function(path, options) {
options.hash.contentBinding = SC.Binding.from('*'+path, this);
options.hash.contentBinding = SC.Binding.from('*'+path, this).oneWay();
options.hash.preserveContext = true;
return Handlebars.helpers.collection.call(this, null, options);
});
Expand Down

0 comments on commit af32c22

Please sign in to comment.