diff --git a/js/src/forum/addUserInfo.js b/js/src/forum/addUserInfo.js index 4d6cfc8..78e8f8b 100644 --- a/js/src/forum/addUserInfo.js +++ b/js/src/forum/addUserInfo.js @@ -104,18 +104,20 @@ export default function () { const header_node = vnode.children.find(matchTag('h3')); const amt = Number(setting('rankAmt')) ?? user.ranks().length; - header_node.children = header_node.children - .concat( - user - .ranks() - .reverse() - .splice(0, amt) - .map((rank) => { - return {rankLabel(rank)}; - }) - ) - .filter(function (el) { - return el.tag !== undefined; - }); + if (user.ranks()) { + header_node.children = header_node.children + .concat( + user + .ranks() + .reverse() + .splice(0, amt) + .map((rank) => { + return {rankLabel(rank)}; + }) + ) + .filter(function (el) { + return el.tag !== undefined; + }); + } }); }