-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
In my app I use an computed property to state how many steps are left to do for creating the models. This depends on how many steps are already done and which kind of model it is currently creating. (We create different kind of coworkers)
In Ember 2.5 it did work. After upgrading or slightly after (not quite sure) it stopped working.
this is my cp
numberOfSubSteps: Ember.computed('model.constructor.modelName', function() {
let valueBasedOnModel = 4;
switch(this.get('model.constructor.modelName')) {
case 'kurzfristig':
valueBasedOnModel = 5;
break;
case 'geringfugig':
valueBasedOnModel = 6;
break;
...
}
return valueBasedOnModel;
}),
I found the exact line where it changes the constructor. (It defines a new property which somehow is then returning undefined.)
https://github.com/emberjs/ember.js/blob/master/packages/ember-metal/lib/watch_key.js#L81
This is the callstack when it happens

might be somewhat related to #9387
Panman82 and urbany