1
0
mirror of https://github.com/flarum/core.git synced 2025-08-07 08:56:38 +02:00

Fix going from one user page directly to another

This commit is contained in:
Alexander Skvortsov
2020-08-27 13:14:54 -04:00
committed by Franz Liedke
parent c8f47d519d
commit f67194484b

View File

@@ -27,6 +27,17 @@ export default class UserPage extends Page {
this.user = null;
this.bodyClass = 'App--user';
this.prevUsername = m.route.param('username');
}
onbeforeupdate() {
const currUsername = m.route.param('username');
if (currUsername !== this.prevUsername) {
this.prevUsername = currUsername;
this.loadUser(currUsername);
}
}
view() {