mirror of
https://github.com/thelounge/thelounge
synced 2025-02-16 21:28:23 +00:00
Disallow navigating to invalid channels
This commit is contained in:
parent
5c0a7722a4
commit
897f238c38
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ router.beforeEach((to, from, next) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disallow navigating to invalid channels
|
||||||
|
if (to.name === "RoutedChat" && !store.getters.findChannel(Number(to.params.pathMatch))) {
|
||||||
|
next(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Handle closing image viewer with the browser back button
|
// Handle closing image viewer with the browser back button
|
||||||
if (!router.app.$refs.app) {
|
if (!router.app.$refs.app) {
|
||||||
next();
|
next();
|
||||||
|
|
Loading…
Add table
Reference in a new issue