ember-select-2 icon indicating copy to clipboard operation
ember-select-2 copied to clipboard

Ember 1.10 / canary: Uncaught TypeError: Cannot read property 'each' of undefined

Open zyllorion opened this issue 10 years ago • 5 comments

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.

zyllorion avatar Jan 12 '15 15:01 zyllorion

Same issue with Ember 1.11.0-beta.1+canary.8127715c

bradplank avatar Jan 30 '15 19:01 bradplank

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);

Vincz avatar Feb 03 '15 12:02 Vincz

Same with Ember : 1.10.0-beta.4 Ember cli : 0.1.12

fantactuka avatar Feb 05 '15 16:02 fantactuka

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.

avanov avatar Apr 29 '15 13:04 avanov

me too.. Ember : 1.12.0 Ember Data : 1.0.0-beta.17

andreyreyand avatar Sep 02 '15 03:09 andreyreyand