fix realname undefined #6118
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
49b561260a
commit
6c685d5557
|
@ -818,8 +818,8 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||||
// Patch node links with names, like meshes links with names
|
// Patch node links with names, like meshes links with names
|
||||||
for (var a in docs[i].links) {
|
for (var a in docs[i].links) {
|
||||||
if (!docs[i].links[a].name) {
|
if (!docs[i].links[a].name) {
|
||||||
if (parent.users[a].realname) { docs[i].links[a].name = parent.users[a].realname; }
|
if (parent.users[a] && parent.users[a].realname) { docs[i].links[a].name = parent.users[a].realname; }
|
||||||
else if (parent.users[a].name) { docs[i].links[a].name = parent.users[a].name; }
|
else if (parent.users[a] && parent.users[a].name) { docs[i].links[a].name = parent.users[a].name; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue