FIX: Allow Spoiler plugin (and others that use prototype.on) to work even if ListView was not initialized.

This commit is contained in:
Robin Ward 2013-10-01 13:53:26 -04:00
parent 125c848ee3
commit 63d86eb9eb
1 changed files with 5 additions and 2 deletions

View File

@ -236,8 +236,11 @@ Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
Discourse.subscribeUserToNotifications();
if (Discourse.initializers) {
Discourse.initializers.forEach(function (init) {
init.call(this);
var self = this;
Em.run.next(function() {
Discourse.initializers.forEach(function (init) {
init.call(self);
});
});
}
}