mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 07:03:35 +08:00
Still set username if user is undefined
Fixes "Started 12 hours ago by undefined" on discussion author avatar tooltip
This commit is contained in:
parent
151af395c9
commit
ebf57c389e
|
@ -60,7 +60,7 @@ export default class Translator {
|
|||
// future there should be a hook here to inspect the user and change the
|
||||
// translation key. This will allow a gender property to determine which
|
||||
// translation key is used.
|
||||
if (input.user instanceof User) {
|
||||
if ('user' in input) {
|
||||
const user = extract(input, 'user');
|
||||
|
||||
if (!input.username) input.username = username(user);
|
||||
|
|
Loading…
Reference in New Issue
Block a user