From a2c1d1175b71b9cb815934ddc322606458528438 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Mon, 20 Jul 2020 11:49:53 +0300 Subject: [PATCH] Disallow navigating to invalid networks --- client/js/router.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/js/router.js b/client/js/router.js index 489b9441..58381238 100644 --- a/client/js/router.js +++ b/client/js/router.js @@ -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();