tildeio / htmlbars

A variant of Handlebars that emits DOM and allows you to write helpers that manipulate live DOM nodes
MIT License
1.61k stars 193 forks source link

[BUGFIX beta] Range redirection #441

Closed Serabe closed 8 years ago

Serabe commented 8 years ago

When an range calls handleRedirect it sets the params to an array containing its value. This causes problems with contextual components called with dot syntax.

If a contextual component is called with dot syntax and any kind of arguments (either params and attrs) it gets compiled to inline. But when called without any of them ({{contextual.my-component}}), it gets compiled to a range.

The range calls to handleRedirect but sets params to be [value] instead of an empty array, causing positionalParams to receive the wrong value.

Fixes emberjs/ember.js#12717

rwjblue commented 8 years ago

Seems good to me.

@mixonic - Any objections?

mixonic commented 8 years ago

@Serabe hm, and you're tested this with Ember? I would expect the reason value is passed as params is to allow later keywords to add that stream as a dependency.

mixonic commented 8 years ago

@rwjblue I think this will require a release of htmlbars and update to beta of Ember?

rwjblue commented 8 years ago

Ya, thanks for the poke @mixonic. Released as v0.14.11.