ember-select-2
ember-select-2 copied to clipboard
Ember 1.10 / canary: Uncaught TypeError: Cannot read property 'each' of undefined
Using the code:
{{select-2 content=theReasons value=model.reason optionValuePath="id" placeholder="Choose a reason" label="Reason"}}
With the following defined in the controller:
export default Ember.Controller.extend({
theReasons: [{
id: "Reason 1",
text: "Reason 1"
}, {
id: "Reason 2",
text: "Reason 2"
}],
I get the following error because theReasons can't be found:
Uncaught TypeError: Cannot read property 'each' of undefined
The same code used to work, not sure exactly which Ember version it broke with.
Same issue with Ember 1.11.0-beta.1+canary.8127715c
This issue seems related to the Ember.Assert call on line 61. Removing the following line and it works.
Ember.assert("select2 has to exist on Ember.$.fn.select2", Ember.$.fn.select2);
Same with Ember : 1.10.0-beta.4 Ember cli : 0.1.12
The same issue with Ember CLI 0.2.0.
It might be related to changes in handlebars scope and deprecations introduced in Ember 1.9.
me too.. Ember : 1.12.0 Ember Data : 1.0.0-beta.17