I’ve just upgraded my app from 1.13.8 to 2.4.x.
I’m seeing something odd happening in my instance-initializer:
import Ember from 'ember';
Ember.$(document).on('custom-event', function () {
alert('hello');
});
export function initialize (instance) {
}
export default {
name: 'yard-interface',
initialize: initialize
};
The custom event is fired by a third-party script that is asynchronously loaded (it’s loaded pretty quick though). In Ember 1.13.8 the event was correctly fired. In Ember 2.4.x the event callback doesn’t trigger - seems a race condition is happening here and I’m unable to pin down what’s happening.