Import upstream patches from The Lounge (Feb 2024), bump version to v4.4.1-2 #2

Merged
hgw merged 18 commits from upstream-patches-202402 into master 2024-02-02 03:41:49 +00:00
Showing only changes of commit a0f0dae3f7 - Show all commits

View File

@ -110,26 +110,23 @@ router.beforeEach((to, from, next) => {
next();
});
router.beforeEach((to, from, next) => {
router.beforeEach((to, from) => {
// Disallow navigating to non-existing routes
if (!to.matched.length) {
next(false);
return;
return false;
}
// Disallow navigating to invalid channels
if (to.name === "RoutedChat" && !store.getters.findChannel(Number(to.params.id))) {
next(false);
return;
return false;
}
// Disallow navigating to invalid networks
if (to.name === "NetworkEdit" && !store.getters.findNetwork(String(to.params.uuid))) {
next(false);
return;
return false;
}
next();
return true;
});
router.afterEach((to) => {