Fix broken page title logic on subpath installs

The base path needs to be accounted for when calculating whether we're on the default route.
This commit is contained in:
Alexander Skvortsov 2020-10-30 14:18:09 -04:00
parent 12c03dc4e1
commit 8b1de457bf

View File

@ -270,7 +270,7 @@ export default class Application {
updateTitle() {
const count = this.titleCount ? `(${this.titleCount}) ` : '';
const pageTitleWithSeparator = this.title && m.route.get() !== '/' ? this.title + ' - ' : '';
const pageTitleWithSeparator = this.title && m.route.get() !== this.forum.attribute('basePath') + '/' ? this.title + ' - ' : '';
const title = this.forum.attribute('title');
document.title = count + pageTitleWithSeparator + title;
}