mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 03:32:49 +08:00
Only automatically load page for UserPage if username param is present
This avoid issues with SettingsPage
This commit is contained in:
parent
759eb80ff9
commit
d17cc1beee
|
@ -27,14 +27,14 @@ export default class UserPage extends Page {
|
|||
this.user = null;
|
||||
|
||||
this.bodyClass = 'App--user';
|
||||
|
||||
this.currUsername = m.route.param('username');
|
||||
}
|
||||
|
||||
onNewRoute() {
|
||||
super.onNewRoute();
|
||||
|
||||
this.loadUser(m.route.param('username'));
|
||||
if (m.route.param('username')) {
|
||||
this.loadUser(m.route.param('username'));
|
||||
}
|
||||
}
|
||||
|
||||
view() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user