Disallow navigating to invalid channels
This commit is contained in:
parent
5c0a7722a4
commit
897f238c38
@ -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…
Reference in New Issue
Block a user