From f80781de3c36f5446eef123eed7744deff784bff Mon Sep 17 00:00:00 2001 From: Davide Iadeluca <146922689+DavideIadeluca@users.noreply.github.com> Date: Sun, 10 Nov 2024 09:50:30 +0100 Subject: [PATCH] fix: early return if user has no rank (#128) --- 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