Disallow navigating to invalid networks

This commit is contained in:
Pavel Djundik 2020-07-20 11:49:53 +03:00
parent 181a198994
commit a2c1d1175b

View File

@ -94,6 +94,12 @@ router.beforeEach((to, from, next) => {
return; 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 // Handle closing image viewer with the browser back button
if (!router.app.$refs.app) { if (!router.app.$refs.app) {
next(); next();