Skip to content

Commit

Permalink
fix realname undefined Ylianst#6118
Browse files Browse the repository at this point in the history
Signed-off-by: si458 <simonsmith5521@gmail.com>
  • Loading branch information
si458 committed May 24, 2024
1 parent 49b5612 commit 6c685d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meshuser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
for (var a in docs[i].links) {
if (!docs[i].links[a].name) {
if (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; }
if (parent.users[a] && parent.users[a].realname) { docs[i].links[a].name = parent.users[a].realname; }
else if (parent.users[a] && parent.users[a].name) { docs[i].links[a].name = parent.users[a].name; }
}
}

Expand Down

0 comments on commit 6c685d5

Please sign in to comment.