Don't override username if already set

This commit is contained in:
Toby Zerner 2015-07-20 18:13:56 +09:30
parent ae18e30063
commit 2f3569bed5

View File

@ -61,7 +61,9 @@ export default class Translator {
// translation key. This will allow a gender property to determine which
// translation key is used.
if (input.user instanceof User) {
input.username = username(extract(input, 'user'));
const user = extract(input, 'user');
if (!input.username) input.username = username(user);
}
// If we've found the appropriate translation string, then we'll sub in the