Skip to content

get keyword does not allow numeric keys to be used #13296

@rwjblue

Description

@rwjblue

Due to this line, using get with a numeric key does not work properly.

  model() {
    return {
      indexes: [2,3,4],
      items: {
        2: 'blah',
        3: 'zorz',
        4: 'derp'        
      }
    }
  },
    <ul>
      {{#each model.indexes as |index|}}
        <li>{{get model.items index}}</li>
      {{/each}}
    </ul>

Demo: http://rwjblue.jsbin.com/loneva/edit?html,js,output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions