Make sure channel exists.
This commit is contained in:
parent
8cb49ae56a
commit
d9f8f45169
@ -97,11 +97,13 @@ Mousetrap.bind(["alt+a"], function() {
|
||||
function jumpToChannel(targetChannel) {
|
||||
switchToChannel(targetChannel);
|
||||
|
||||
scrollIntoViewNicely(
|
||||
document.querySelector(
|
||||
`#sidebar .channel-list-item[aria-controls="#chan-${targetChannel.id}"]`
|
||||
)
|
||||
const element = document.querySelector(
|
||||
`#sidebar .channel-list-item[aria-controls="#chan-${targetChannel.id}"]`
|
||||
);
|
||||
|
||||
if (element) {
|
||||
scrollIntoViewNicely(element);
|
||||
}
|
||||
}
|
||||
|
||||
// Ignored keys which should not automatically focus the input bar
|
||||
|
Loading…
Reference in New Issue
Block a user