Only automatically load page for UserPage if username param is present

This avoid issues with SettingsPage
This commit is contained in:
Alexander Skvortsov 2020-10-04 22:02:16 -04:00
parent 759eb80ff9
commit d17cc1beee

View File

@ -27,15 +27,15 @@ export default class UserPage extends Page {
this.user = null;
this.bodyClass = 'App--user';
this.currUsername = m.route.param('username');
}
onNewRoute() {
super.onNewRoute();
if (m.route.param('username')) {
this.loadUser(m.route.param('username'));
}
}
view() {
return (