BUGFIX: setting title to aggressively

This commit is contained in:
Sam 2014-06-17 11:32:59 +10:00
parent 92772bbf1d
commit f8dec65b95
1 changed files with 6 additions and 1 deletions

View File

@ -33,7 +33,12 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
title += "" + (this.get('title')) + " - ";
}
title += Discourse.SiteSettings.title;
$('title').text(title);
// if we change this we can trigger changes on document.title
// only set if changed.
if($('title').text() !== title) {
$('title').text(title);
}
var notifyCount = this.get('notifyCount');
if (notifyCount > 0 && !Discourse.User.currentProp('dynamic_favicon')) {