Skip to content

Node.js based forum software built for the modern web

removed unnecessary conditionals from app.updateHeader

psychobunnyff9d7c6c24bd
diff --git a/public/src/app.js b/public/src/app.js
index 725e31ca7e..80874543e8 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -510,19 +510,17 @@ var socket,
var userLabel = loggedInMenu.find('#user_label');
- if (userLabel.length) {
- if (data.userslug) {
- userLabel.find('#user-profile-link').attr('href', RELATIVE_PATH + '/user/' + data.userslug);
- }
- if (data.picture) {
- userLabel.find('img').attr('src', data.picture);
- }
- if (data.username) {
- userLabel.find('#user-profile-link>span').html(' ' + data.username);
- }
-
- $('#logout-link').on('click', app.logout);
+ if (data.userslug) {
+ userLabel.find('#user-profile-link').attr('href', RELATIVE_PATH + '/user/' + data.userslug);
}
+ if (data.picture) {
+ userLabel.find('img').attr('src', data.picture);
+ }
+ if (data.username) {
+ userLabel.find('#user-profile-link>span').html(' ' + data.username);
+ }
+
+ $('#logout-link').on('click', app.logout);
updateOnlineStatus(data.uid);