Merge pull request #1889 from thelounge/astorije/fix-window-on-load

Display the correct window on page reload
This commit is contained in:
Jérémie Astori 2017-12-24 14:47:13 -05:00 committed by GitHub
commit 12dd11bd10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,7 +64,8 @@ function openCorrectChannel(clientActive, serverActive) {
// Open window provided in location.hash
if (target.length === 0 && window.location.hash) {
target = $("#footer, #sidebar").find(`.chan[data-target="${escape(window.location.hash)}"]`);
target = $("#footer, #sidebar, #help")
.find(`[data-target="${escape(window.location.hash)}"]`);
}
// Open last active channel according to the server