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

get helper silently fails to access number-like keyed items #440

Closed barneycarroll closed 8 years ago

barneycarroll commented 8 years ago

I thought this was an issue with 'linked' Arrays, but it seems to be more complicated than that. See this twiddle:

export default Ember.Controller.extend({
  numbers:['1','2','3','4'],
  letters:{ '0':'a', '1':'b', '2':'c', '3':'d' }
});
{{#each numbers as | value index |}}
    {{my-component 
    number=value
    letter=(get letters index)
  }}
{{/each}}
rwjblue commented 8 years ago

The get helper is implemented in Ember itself (not HTMLBars), so this is likely an issue over there.

barneycarroll commented 8 years ago

Oops! Thanks. I misread the test as the implementation :)