mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 13:17:24 +01:00
fix(model): don't break if auth.local undefined
This commit is contained in:
@@ -116,7 +116,7 @@ export function messageDefaults (msg, user) {
|
||||
contributor: user.contributor && user.contributor.toObject(),
|
||||
backer: user.backer && user.backer.toObject(),
|
||||
user: user.profile.name,
|
||||
username: user.auth.local.username,
|
||||
username: user.auth && user.auth.local && user.auth.local.username,
|
||||
});
|
||||
} else {
|
||||
message.uuid = 'system';
|
||||
|
||||
Reference in New Issue
Block a user