From 0ca647737c780d1ff4158adbf3633ee2763bc251 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Sun, 10 Nov 2024 09:48:37 +0100 Subject: [PATCH] fix: early return if user has no rank --- js/src/forum/addUserInfo.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/src/forum/addUserInfo.js b/js/src/forum/addUserInfo.js index 69ff1e1..5c17267 100644 --- a/js/src/forum/addUserInfo.js +++ b/js/src/forum/addUserInfo.js @@ -100,6 +100,8 @@ export default function () { const header_node = vnode.children.find(matchClass('PostUser-name')); const amt = Number(setting('rankAmt')) ?? user.ranks().length; + if (!user.ranks()) return; + header_node.children = header_node.children .concat( user