mirror of
https://github.com/flarum/framework.git
synced 2025-03-10 04:05:30 +08: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
0cd57d8cba
commit
bea0f3c05b
@ -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