mirror of
https://github.com/thelounge/thelounge
synced 2024-11-14 00:07:17 +00:00
Disallow navigating to invalid networks
This commit is contained in:
parent
181a198994
commit
a2c1d1175b
1 changed files with 6 additions and 0 deletions
|
@ -94,6 +94,12 @@ router.beforeEach((to, from, next) => {
|
|||
return;
|
||||
}
|
||||
|
||||
// Disallow navigating to invalid networks
|
||||
if (to.name === "NetworkEdit" && !store.getters.findNetwork(to.params.uuid)) {
|
||||
next(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle closing image viewer with the browser back button
|
||||
if (!router.app.$refs.app) {
|
||||
next();
|
||||
|
|
Loading…
Reference in a new issue