FIX: PageTracker was not sending the proper page title through at all
times.
This commit is contained in:
parent
2d9187cd9d
commit
a0e92ef57a
|
@ -19,7 +19,13 @@ Discourse.PageTracker = Ember.Object.extend(Ember.Evented, {
|
|||
|
||||
router.on('didTransition', function() {
|
||||
this.send('refreshTitle');
|
||||
self.trigger('change', this.get('url'), Discourse.get('_docTitle'));
|
||||
var url = this.get('url');
|
||||
|
||||
// Refreshing the title is debounced, so we need to trigger this in the
|
||||
// next runloop to have the correct title.
|
||||
Em.run.next(function() {
|
||||
self.trigger('change', url, Discourse.get('_docTitle'));
|
||||
});
|
||||
});
|
||||
this.set('started', true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue