Skip to content

Commit

Permalink
Added system to clear custom title if we're on the default route
Browse files Browse the repository at this point in the history
  • Loading branch information
askvortsov1 committed Mar 20, 2020
1 parent 18f53fd commit d74dfe8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions js/src/common/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,13 @@ export default class Application {
}

updateTitle() {
document.title = (this.titleCount ? `(${this.titleCount}) ` : '') +
(this.title ? this.title + ' - ' : '') +
this.forum.attribute('title');
if (m.route() == "/") {
document.title = this.forum.attribute('title');
} else {
document.title = (this.titleCount ? `(${this.titleCount}) ` : '') +
(this.title ? this.title + ' - ' : '') +
this.forum.attribute('title');
}
}

/**
Expand Down

0 comments on commit d74dfe8

Please sign in to comment.