From f8dec65b9587316748163cba9fb901a2c1986a93 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 17 Jun 2014 11:32:59 +1000 Subject: [PATCH] BUGFIX: setting title to aggressively --- app/assets/javascripts/discourse.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse.js b/app/assets/javascripts/discourse.js index db41ce1c93d..ad0829105a6 100644 --- a/app/assets/javascripts/discourse.js +++ b/app/assets/javascripts/discourse.js @@ -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')) {