Make sure the cookie stored channel exists on the correct server
This commit is contained in:
parent
e132c8201f
commit
1b202e7c2b
File diff suppressed because one or more lines are too long
|
@ -23,7 +23,13 @@ export default function initialState({ store }) {
|
|||
if (tab) {
|
||||
const [server, name = null] = tab.split(/;(.+)/);
|
||||
|
||||
if (name && find(env.channels, chan => chan.name === name)) {
|
||||
if (
|
||||
name &&
|
||||
find(
|
||||
env.channels,
|
||||
chan => chan.server === server && chan.name === name
|
||||
)
|
||||
) {
|
||||
store.dispatch(select(server, name, true));
|
||||
} else if (find(env.servers, srv => srv.host === server)) {
|
||||
store.dispatch(select(server, null, true));
|
||||
|
|
Loading…
Reference in New Issue