mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 00:45:47 +01:00
fixed admin js error, was trying to use socket. before it was connected
This commit is contained in:
@@ -98,6 +98,8 @@ var socket,
|
|||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.enter_room('global');
|
||||||
},
|
},
|
||||||
async: false
|
async: false
|
||||||
});
|
});
|
||||||
@@ -194,8 +196,9 @@ var socket,
|
|||||||
|
|
||||||
app.current_room = null;
|
app.current_room = null;
|
||||||
app.enter_room = function(room) {
|
app.enter_room = function(room) {
|
||||||
if (app.current_room === room) return;
|
if (app.current_room === room)
|
||||||
|
return;
|
||||||
|
|
||||||
socket.emit('event:enter_room', {
|
socket.emit('event:enter_room', {
|
||||||
'enter': room,
|
'enter': room,
|
||||||
'leave': app.current_room
|
'leave': app.current_room
|
||||||
@@ -234,9 +237,6 @@ var socket,
|
|||||||
|
|
||||||
loadConfig();
|
loadConfig();
|
||||||
|
|
||||||
app.enter_room('global');
|
|
||||||
|
|
||||||
|
|
||||||
// On menu click, change "active" state
|
// On menu click, change "active" state
|
||||||
var menuEl = document.querySelector('.nav'),
|
var menuEl = document.querySelector('.nav'),
|
||||||
liEls = menuEl.querySelectorAll('li'),
|
liEls = menuEl.querySelectorAll('li'),
|
||||||
|
|||||||
Reference in New Issue
Block a user