Skip to content

Node.js based forum software built for the modern web

parseInt

barisusaklib6e0a2eccefb
diff --git a/public/src/forum/account/profile.js b/public/src/forum/account/profile.js
index 9c45bf6e7b..6b6d38ad66 100644
--- a/public/src/forum/account/profile.js
+++ b/public/src/forum/account/profile.js
@@ -43,7 +43,7 @@ define(['forum/account/header'], function(header) {
}
function updateButtons() {
- var isSelfOrNotLoggedIn = yourid === theirid || yourid === '0';
+ var isSelfOrNotLoggedIn = yourid === theirid || parseInt(yourid, 10) === 0;
$('#follow-btn').toggleClass('hide', isFollowing || isSelfOrNotLoggedIn);
$('#unfollow-btn').toggleClass('hide', !isFollowing || isSelfOrNotLoggedIn);
$('#chat-btn').toggleClass('hide', isSelfOrNotLoggedIn);