mirror of
https://github.com/flarum/core.git
synced 2025-05-07 07:55:44 +02:00
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:
parent
12c03dc4e1
commit
8b1de457bf
@ -270,7 +270,7 @@ export default class Application {
|
|||||||
|
|
||||||
updateTitle() {
|
updateTitle() {
|
||||||
const count = this.titleCount ? `(${this.titleCount}) ` : '';
|
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');
|
const title = this.forum.attribute('title');
|
||||||
document.title = count + pageTitleWithSeparator + title;
|
document.title = count + pageTitleWithSeparator + title;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user