mirror of
https://github.com/flarum/framework.git
synced 2025-01-22 12:33:17 +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
12c03dc4e1
commit
8b1de457bf
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user