mirror of
https://github.com/flarum/framework.git
synced 2024-11-24 17:12:13 +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,15 +27,15 @@ export default class UserPage extends Page {
|
||||||
this.user = null;
|
this.user = null;
|
||||||
|
|
||||||
this.bodyClass = 'App--user';
|
this.bodyClass = 'App--user';
|
||||||
|
|
||||||
this.currUsername = m.route.param('username');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onNewRoute() {
|
onNewRoute() {
|
||||||
super.onNewRoute();
|
super.onNewRoute();
|
||||||
|
|
||||||
|
if (m.route.param('username')) {
|
||||||
this.loadUser(m.route.param('username'));
|
this.loadUser(m.route.param('username'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
view() {
|
view() {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user