ef4/ember-elsewhere

Breaks with Ember 3.3

marten-dockyard opened this issue · 4 comments

Haven't yet figured out why and how, but after upgrading Ember(-JS|-Data|-CLI) to 3.3 all the tests involving Ember Elsewhere started to fail. If I figure out why, I'll leave another comment.

Just clarify that ember-source is the only responsable here, this ember-cli 3.3 works if ember-source is downgraded to 3.2

I can tell that (get (get service.actives name) 'lastObject.component') returns undefined. It seems that actives array is not an array like before, because it does not have computed property lastObject.

It happens here https://github.com/ef4/ember-elsewhere/blob/master/addon/services/ember-elsewhere.js#L46, where sortBy() returns native array.

Possible fix would be to wrap sorted array with Ember.A() like this

newActives[target] = emArray(newActives[target].sortBy('order'));

I'm happy to send PR if this fix makes sense for you, or should it be tracked in Ember itself?

ef4 commented

Nice work @bobisjan. That PR would be appreciated. I will also file an issue on Ember, I'm not sure if this was already a known issue.

ef4 commented

Thanks, @bobisjan's PR is released in 1.0.5, and I updated our test setup so we now have proper coverage for current Ember release channels (before it was using the old bower setup, so it wasn't updating past ember 2.18).

There is still arguably a breaking change in Ember 3.3 that we worked around.