googlearchive / TemplateBinding

TemplateBinding Prolyfill
290 stars 56 forks source link

Functions in bindings seem to be called twice #174

Closed robdodson closed 10 years ago

robdodson commented 10 years ago

Looking at this example: http://jsbin.com/niteta/6/edit

The sublist function is always called twice, regardless of what it actually does or returns.

sjmiles commented 10 years ago

Just a note that this appears to be an issue with filters generally. It happens whether using pipe or function syntax.

nevir commented 10 years ago

Interestingly, and seemingly related: we're binding to the output of that function, which seems like it has the potential to be severely confusing: http://jsbin.com/koviji/1/edit

Should it be binding at all? Seems like it should be binding, at most, to the function itself (too magic otherwise?).

sjmiles commented 10 years ago

@jmesserly or @ajklein ... maybe you can review? Seems good to get this fixed asap.